3D Secure Check in custom payment gateway

  • Posts: 131
  • Thank you received: 7
10 years 5 months ago #161926

As part of the development of our PayGate payment plug-in we need to add support for 3D Secure.

The way that the PayGate API works is :-

1. We form the authorisation request, with card and address details.
2. We call the PayGate API
3. PayGate servers decide whether a 3D Secure check is required
3a. If not, the card is authorised or declined in the normal manner and a success/failure status is passed back to us.
3b. If 3D Secure required PayGate passes us a unique 3D Secure URL for us to present on the payment page. The user completes the 3D Secure check, and the transaction is authorised or declined and a success or failure status is passed back to us.

So, we need a method to be able to handle the 3D Secure URL in our code and need to be able to either present the URL in an iframe under the card details or to pop it into a modal window.

We cannot find any example code to help us to understand how to do this, or any documentation in Hika.

Can you help please?

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 5 months ago #161941

Hi,

You can read the plugin "cardsave", it supports the 3D Secure using the trigger "onThreeDSecure".

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 131
  • Thank you received: 7
10 years 5 months ago #161984

Jerome,

Thanks - but this shows that the collection of the information required for the 3D Secure check is under the control of the GUI as a form.

We don't have that option with PayGate - instead as per my post above, we are passed a URL which we have to present in an iframe. So, we need to either present the iframe inline on the payment page or pop a modal window to render the iframe. It is displaying the iframe in our code that we need help with...

Here's the section from the PayGate documentation:-

3D Secure using PayGate’s MPI – more redirect detail
If you receive a securerx message, it means MasterCard SecureCode / Verified-by-Visa authentication is required. The customer’s browser must be re-directed as described below.
Redirect To Bank
The data returned in the securerx message contains (amongst others) a URL, Transaction ID and Checksum; please refer to the Transaction Authentication for details of the data returned.
PayGate recommends making use of the HTML IFRAME tag to redirect the customer’s browser to the URL; you are also required to pass the Transaction ID, Checksum and your PayGate ID. Please ensure that you allow for a width of at least 390 pixels and a height of at least 400 pixels to display the IFRAME.
Example
Assuming the following values are returned in the securerx message:

URL (url attribute): www.paygate.co.za/3dsecure/3dsecure.trans
Transaction ID (tid attribute): 123456
Checksum (chk attribute): ab12cd34ef56gh78ij90kl12mn34op56

The IFRAME that is returned to the customer’s browser would be:
<IFRAME width="390" height="400" src=" www.paygate.co.za/3dsecure/3dsecure.tran...D=123456&CHECKSUM=ab 12cd34ef56gh78ij90kl12mn34op56"></IFRAME>

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
10 years 4 months ago #162030

Hi,

Normally, the credit card information is gathered automatically by HikaShop when you return true in the needCC function of the payment plugin (see authorize.net). Then, the payment method implement the onBeforeOrderCreate() trigger to process the credit card payment during the order creation process at the end of the checkout and in that function it retrieves the credit card data with the $this->ccLoad(); function call.
That's how is done the authorize.net AIM mode if you want to refer to it.
So in your case, in that onBeforeOrderCreate when you send the order details and that the payment gateway returns you the information for the display of the iframe, you should store that somewhere in an attribute of $this (the object of the plugin) so that you can then use it in the onAfterOrderConfirm trigger in order to display the iframe by just echo the HTML of the iframe in that onAfterOrderConfirm function of your plugin.

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum