Finalize Card Payment, Indirect Mode
This function is used to credit a wallet using a card when the money-in has been previously initialized with moneyInWebInit function of the DirectKit webservice. 3D-Secure is used if the bank of the user enables 3D Secure.
Please refer to Annex Payment Page Customization to customize the payment web page.
How it works
Prerequisite: You have initialized money-in using the moneyInWebInit method of DirectKit. Your server owns a money-in token now:
- Your server redirects the user to Lemonway WebKit with the money-in token using a GET
- The WebKit does some checking and redirects the user to the card payment page
- On this payment webpage, the user can enter the card data
- Then a 3D Secure verification is processed if the bank owning the card has a 3D Secure payment for this card
- The money-in transaction is saved and the user is redirected to your website.
Request
This request is sent to Lemonway WebKit using the following parameters in the query string:
Variable | Description | Mandatory | Format | Example |
---|---|---|---|---|
moneyInToken | Money-in token received in the output of moneyInWebInit of DirectKit | Yes | [1:256] char | 62612109COhhmoY3kOBhf9O7op8g1m8NE |
p | URL of the CSS to customize the payment page | No | https%3A%2F%2Fwww.lemonway.fr%2Fmercanet_lw.css | |
lang | ISO2 language code for the payment page. Non-exhaustive lists of accepted codes: | No | [2] char | |
tpl | The name of the template to use on the payment page Only for ATOS v2 contracts. | No | [1:256] char | Custom template |
Examples
<?php /* $wkURL : URL of WEBKIT $moneyInToken : Token retrieved from DIRECTKIT $p : URL of customization CSS, encoded URL $lang : Language to use for the page */ header('Location: '.$wkURL.'?moneyInToken='.$moneyInToken.'&p='.$p.'&lang='.$lang); ?>
Answer
Your system returns URL (success, error, cancel depending on the response) receives 2 different responses:
- When the client terminates its payment or when the payment is canceled by the user, a notification (callback) is sent from Lemonway's server to your URL. Data are transmitted in POST.
- When the client terminates its operation, he is redirected to your URL with data in a GET
POST Answer:
Item | Description | Example |
---|---|---|
response_code | Answer code:
| 0000 |
response_wkToken | wkToken sent by you when initializing the money-in | rhjzekdzejkd |
response_msg | Comment on answer code | |
response_transactionId | Lemonway transaction ID | 755 |
response_transactionAmount | Amount of the payment transaction | 34.00 |
response_transactionMessage | Comment | pizza |
response_code | Description |
---|---|
2001 | Command not recognized |
2002 | Operation canceled by the user |
2003 | Authentication failed on Webkit |
2004 | Bad format Request |
3000 | Server Error |
4000 | Unknown Error |
GET answer:
Item | Description | Example |
---|---|---|
response_wkToken | wkToken went you in the entry of money-in initialization. | rhjzekdzejkd |