Jump to content

Develop payment gateway


tcvdveer

Recommended Posts

I have to develop a payment gateway that uses a redirect to the bank and the bank uses a 3d http post validation. Unfortunately there is not much info in this forum, in the wiki and in the pdf's on how to integrate something like that with whmcs.

 

Maybe someone can point me in the right direction...

 

How it will have to work:

-a form is send to the bank, containing cc holder name and amount.

-user is redirected to the banks site and makes a transaction.

-bank sends http post to verify amount

-[ok] or [notok] will be send with http post to the bank, confirming or declining the transaction.

-bank sends http post message that transaction has succeeded or failed

 

Some questions:

-will I be using CC or Invoice?

-do I need the callback function, or can I program all in the payment module?

-is viewinvoice.php the only script that customers use to make a payment?

Link to comment
Share on other sites

My first impression was that it would not be very hard to create a custom payment gateway, but since there are no replies, I fear it is not an easy task create a custom development with whmcs.

 

You should be able to manage this with a gateway.

This will be like the paypal one.

You will need to write a form out the post it with javascript.

 

Then parse the data that comes back to update the record.

Link to comment
Share on other sites

Thanks for your reply Shaun. The banks uses a 3d verification method, so not only one post to confirm or decline the transaction. It sends a validation post that has to be replied at, a confirmation post that has to be replied at and subsequent a ok or not ok post to confirm / decline the transaction.

 

The Paypal code with callback function could be handy as an example, but unfortunately everything is encrypted.

Link to comment
Share on other sites

What I did so far:

-created a gateway module that stores the transaction details in a new table, creates a form which posts and redirects to the bank.

-created a new validation page that validates the post from the bank with the stored table data

-created a confirmation page that posts a confirmation to the bank in case the data is correct

-created a ok page, in case an ok post is received from the bank, post an addinvoicepayment action to the api.php

-created a nok page, in case the transaction is declined by the bank to take a certain action

 

For now the problem is the nok page, what action can I post to the api.php or to another whmcs page to let the customer know that there was a problem with the transaction.

 

There are some examples in the Wiki, but they just describe a few examples and when your code deviates from these examples there is no other source to consult.

 

What I'm missing are well documented pages about what actions / parameters can be used with the whmcs. Normally I would find a solution by looking in to the coding, but since everything is encrypted this can not be done.

Link to comment
Share on other sites

What I did so far:

-created a gateway module that stores the transaction details in a new table, creates a form which posts and redirects to the bank.

-created a new validation page that validates the post from the bank with the stored table data

-created a confirmation page that posts a confirmation to the bank in case the data is correct

-created a ok page, in case an ok post is received from the bank, post an addinvoicepayment action to the api.php

-created a nok page, in case the transaction is declined by the bank to take a certain action

 

For now the problem is the nok page, what action can I post to the api.php or to another whmcs page to let the customer know that there was a problem with the transaction.

 

There are some examples in the Wiki, but they just describe a few examples and when your code deviates from these examples there is no other source to consult.

 

What I'm missing are well documented pages about what actions / parameters can be used with the whmcs. Normally I would find a solution by looking in to the coding, but since everything is encrypted this can not be done.

 

What you could do it create a custom email.

Then using the API code call SendEmail and send a WHMCS email letting he customer know that the payment didn't go throught correctly.

Link to comment
Share on other sites

I was thinking about that, but what if the customer doesn't check his e-mail frequently.

 

It would be a nice solution to redirect the customer back to the invoice page and showing the error message there (without using Javascript), so the customer is informed directly and he could make another attempt through the same or through another payment gateway.

 

I was hoping some whmcs action / attribute could trigger that. If not, I would have to create a customer error page with a link to the invoice page and send the e-mail in the way you suggested.

Link to comment
Share on other sites

I was thinking about that, but what if the customer doesn't check his e-mail frequently.

 

It would be a nice solution to redirect the customer back to the invoice page and showing the error message there (without using Javascript), so the customer is informed directly and he could make another attempt through the same or through another payment gateway.

 

I was hoping some whmcs action / attribute could trigger that. If not, I would have to create a customer error page with a link to the invoice page and send the e-mail in the way you suggested.

 

I don't think that the paypal does this.

You could maybe direct them to another custom whmcs page (see wiki) that states that their payment has failed.

Link to comment
Share on other sites

  • 1 month later...

Hi tcvdveer,

 

I was searching for more info about integrating iDeal advanced as an gateway in WHMCS, but I could not find much info about this. I guess you are developing an module for this in WHMCS. I'm interested in your experience in this. Can you please contact me on ray at fox-hosting.nl? I was nog able to send you an private message in this forum.

 

Hope to hear from you soon.

 

Ray

Link to comment
Share on other sites

we have an external payment gateway that pulls data out of WHMCS' database and passes it to the bank. Customers who want to pay using credit card have to use our external frontend, they can't do it through WHMCS.

 

We eventually built up this external frontend and it's become our primary frontend, we don't allow customers to use WHMCS at all anymore, we use a robust API to interact with WHMCS discreetly. so what began as a small task ended up developing into a large project.

Link to comment
Share on other sites

  • 3 weeks later...

I managed to build a few payment gateways (Eurobank, iDeal advanced) using the whmcs api to handle invoices and e-mails through whmcs program. It took a while to figure out the whmcs api, but once I did, I was able to build nice interactions with the new payment gateways.

Link to comment
Share on other sites

  • 2 weeks later...

The payment modules I created are sets of files, so it would not be possible to post a small example here. Also I'm not able to simply share those files, since my customers have paid for them. But to point you in the right direction:

 

Have a look at the available (unencrypted) anz payment module contribution, download and study the gateway module development kit and finally have a look at the API example usage.

Link to comment
Share on other sites

The payment modules I created are sets of files, so it would not be possible to post a small example here. Also I'm not able to simply share those files, since my customers have paid for them. But to point you in the right direction:

 

Have a look at the available (unencrypted) anz payment module contribution, download and study the gateway module development kit and finally have a look at the API example usage.

 

Where is the available (unencrypted) anz payment module contribution?

 

Thank you!

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 months later...

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