How to handle 3DSecure redirect for Server to Server integration - asynchronous payments

Follow

If you integrate using the server to server method, you would need to handle the redirect of the customer to their bank's 3DSecure page, and then wait for the response on the outcome. 

You can then display an appropriate message from your systems, to the customer on the frontend. The ShopperResultURL is important for this communication.

CopyAndPay widget handles this asychronous workflow out-of-the-box. However for Server to server, you would need to implement as below :


1. Send initial payment request.

This will return the 3D Secure redirect url as well as the 3D Secure parameters and their values

 


2. Redirect the shopper to the 3D Secure Page by parsing the redirect url and parameters into a form.

Please see some sample code below. Please note that the parameters and their values may change with each payment

<form name="submitForm" action="https://test.ppipe.net/connectors/demo/simulator.link?REMOTEADDRESS=10.2.20.202&amp;ndcid=01DB19AD58009BBAE81DFB85B7137519.sbg-vm-tx0" method="POST" >

            <input type="hidden" name="MD" value="8a82944a5ad7d3f5015adb73209358b1">
            <input type="hidden" name="connector" value="THREEDSECURE">
            <input type="hidden" name="TermUrl" value="https://test.ppipe.net/connectors/asyncresponse_simulator;jsessionid=9B781F19283F51EB35D12F04DE782216.sbg-vm-con01?asyncsource=THREEDSECURE&amp;ndcid=01DB19AD58009BBAE81DFB85B7137519.sbg-vm-tx01">
            <input type="hidden" name="PaReq" value="IT8ubu+5z4YupUCOEHKsbiPep8UzIAcPKJEjpwGlzD8">

            <noscript>
                <input type='submit' name='submitButton'/>
            </noscript>
 </form>

 


3. The payment status is returned to you in JSON format.

The payment response for a successful payment in the TEST system will always have a result code of 000.100.110. In the LIVE system, the result code is 000.000.000. Any other result code besides this is a failed payment. Below is the JSON response for a successful payment in the TEST system: 

{
"id":"8a8294495afbd2e3015aff726b642a8f",
"paymentType":"DB",
"paymentBrand":"VISA",
"amount":"92.00",
"currency":"ZAR",
"descriptor":"4195.9294.6338 OPP_Channel",
"result":{
"code":"000.100.110",
"description":"Request successfully processed in 'Merchant in Integrator Test Mode'"
},
"card":{
"bin":"411111",
"last4Digits":"1111",
"holder":"Natalie",
"expiryMonth":"12",
"expiryYear":"2017"
},
"threeDSecure":{
"eci":"05",
"verificationId":"AAACAgSRBklmQCFgMpEGAAAAAAA=",
"xid":"CAACCVVUlwCXUyhQNlSXAAAAAAA="
},
"customParameters":{
"CTPE_DESCRIPTOR_TEMPLATE":""
},
"risk":{
"score":"100"
},
"buildNumber":"38eae4de39e48cd5449b8ca8a087641065defcb2@2017-03-23 13:23:41 +0000",
"timestamp":"2017-03-24 08:33:09+0000",
"ndc":"FB641B5447DC6AD637BB7955B44489E3.sbg-vm-tx01"
}



Have more questions? Submit a request

Comments

Powered by Zendesk