Jump to content

Third Party Gateway


souzadavi

Recommended Posts

Hello I created a payment module from this information: https://developers.whmcs.com/payment-gateways/third-party-gateway/

I created the callback file. But from this way all of my payments should be confirmed in time of payment, not later... There is any possibilite to call the callback later?

 

Was so good if there is anyway to call the callback from the button try to capture in invoice admin.

1501577979_Capturadetelade2019-03-2714-24-42.png.7071ab9a4a20f0ac261a693ee2d7a356.png.

 

 

thanks

Link to comment
Share on other sites

If you want the pay now button to charge the card when the pay now button is hit, you need to implement the merchant style gateway .  If the gateway you're using uses a javascriipt for example to take payment information on their side, you would use the _remoteinput function.  however, due note that currently WHMCS changes all forms you return in _remoteinput so that it posts to a 3dauth iframe and this can cause odd behavior like an additional tab / window being open in the browser.  (at least it has for me)   Support has confirmed that there is no other option for this and can not override that behavior and removing the target on the forms or using an addon module instead is required. 

More information on what gateway you are using would help. 

EDIT:  with that said, if the gateway supports callbacks, using those would give you the same results but you may have to do a ajax call on the creditcard page to see if the payment has been done. 

Edited by steven99
Link to comment
Share on other sites

@steven99 when the user hit the pay button I send the user to the bank page to insert the debit card password and after filled up the password, the bank send the user back to my invoice page sometimes the status of this payment come like "waiting" not all the time, just sometimes, here is the deal, because I need check it back again in couple minutes, and the bank doesnt have a payment notification service or something similar, I need get the payment ID that I saved from the json bank return and check in the bank if the status changed to paid.

The deal is how and when I do this check. The button from admin invoice (try to capture) was fine because there is not a lot invoice paid on this method, automatic check should be awesome but I really don't have a clue to how to do it from nice way to not waste too much resource from server. 

 

Any information will be great!!!

 

Ps.: I just created the module, the name is Brazilian debit card (cartão de débito pro Brasil).

 

thanks for your reply 🙂

 

 

Link to comment
Share on other sites

So to confirm, they have no callback / notification service when the payment has cleared their side and you need to use an API of theirs to check the status, is that correct?   If so, the best way I can think of doing that is:

  1. When they return the client to your system, set the invoice status as payment pending. 
  2. Save the json transaction id to the invoice
  3. Use a cron to check invoices in payment pending status and use the transaction ids to pull from the bank and get their current status
    1. I thought there was a hook for just the normal cron running but did not see it so your own file that has similar setup as a custom page would be needed
    2. Once you have the paid status, set the invoice to paid. 
Edited by steven99
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