Jump to content

To integrate escrow payment method with whmcs


rahulkg

Recommended Posts

I want to integrate a new payment method escrow with whmcs? So how to proceed ? I already got the escrow apis from their site for creating transaction with this payment method , retrieve the paid customer details etc. Can you please let me know the steps that I need to do in this process. I think we create a payment button in invoice and on clicking it, direct clients to payment panel where the client does transaction and after transaction the client gets redirected  to our whmcs clientarea. Is it so ? I have checked the payment module integration docs but can you please summarize here the steps I needed to to do for integrating it.

Link to comment
Share on other sites

From what it sounds like, the sample gateway module would be your place to start if they are directed to an external site and not staying within your site.   Once they come back to the payment page on your WHMCS, you record the payment as pending by changing the invoice status to payment pending.  That presumes you get some sort of return with a status.  Then for recording the payment, that would depend on if the escrow provider does callbacks or if you're expected to use the API to check for payment.  If callbacks, then you create file called escrow_callback.php in the gateways folder and supply that URL to the provider .  In the callback file, tie in to whmcs and process the callback using the regular addpayment API for WHMCS.    If you are expected to do checks, then you could do a dailycron hook that grabs invoices with a "payment pending" status, cycles through the those invoices with the escrow provider's API checking for payment status and those that have been paid, you do the addpayment api in WHMCS .

Link to comment
Share on other sites

I have got the following reply from escrow 

"Our integration requires the buyer to agree to the terms, verify their account, and then select to send credit card, PayPal, or wire to escrow.com directly.  This means that escrow.com will hold the funds during the transaction. Escrow.com will release directly to the seller and broker.  I would like to confirm this is the model you would like. We are a little different from regular third party gateways." 

But not sure whether I need to just direct a buyer to your site from our clientarea to escrow site  for doing transaction and whether he/she can do all the process -agree,verify, select payment method and pay all there . if so can we direct the client to your site using an api and passing client info and rest of the process they can do there . And when transaction becomes complete, how we can direct him back to our clientarea site. So can you please let me know which are the apis I need to fetch from them ?

Link to comment
Share on other sites

Taking a look at their API real quick, you would use Create the customer and create a new transaction that you specify is for that new customer.  Or have an option to enter the email address they already have setup there.   Then use the https://www.escrow.com/api/docs/agree-transaction generate agreement link and provide that link to them to click and be directed to the payment site where they login and such.   In WHMCS, most of that would be handled with the _remoteinput() function of the payment gateway. 

Link to comment
Share on other sites

"Our API integration allows you to create the transaction for your parties on escrow.com.  You can either simply create the transaction and then we take over with emails and texts for them to log into escrow.com to review, agree, and pay.  If you prefer, you can keep the majority of the integration on your site. If you are looking for the parties to stay on your site, the API will allow this using specific links. Then, at the end of the actions by the parties, they should still be on your website.  With both integration options, payment is made directly to us by wire, PayPal, or credit card as we handle payment directly."  I got this updation from escrow too. 

I see two files for creating thirdparty payment modules

https://github.com/WHMCS/sample-gateway-module/blob/master/modules/gateways/gatewaymodule.php

https://github.com/WHMCS/sample-gateway-module/blob/master/modules/gateways/callback/gatewaymodule.php

Should I use the same files and alter the functions to get it done or just alter the gatewaymodule_link  function there in first link . can you please explain the functions used in the two links. 

 

 

 

Link to comment
Share on other sites

May I get a reply from whmcs developer side about its integration? IThe escrow support told the above and after looking their module,  The escrow support told their module is a little different from normal third party modules. what they do is when clients pay through paypal / credit they just keep the money in their account and messages seller that the client paid monet and when seller provides him service they release the money to seller . so for integrating such thirdparty module with whmcs , they said we have to create a customer with their account and make transaction using their api and then rest process client does in their site . 

So for this purpose do I need to use all the functions like gatewaymodule_config , gatewaymodule_link, gatewaymodule_refund and gatewaymodule_cancelSubscription in a file and put it in whmcs gateways directory?  Can you please summarise the purpose of these functions and shall I create a customer create function and create transaction function in same file where I can use their apis ? Actually when (which hook point) I need to create a customer and then add create transaction functions? Can you just clarify about the purpoose of functions used there as I didnt find a detailed documentation there for thirdparty gateway module default functions used in whmcs? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated