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 DIRECTKIT webservice. 3D-Secure is used if the bank of the user enable 3D Secure.

Please refer to Annex Payment page customization to customize the payment web page.

How it works

Pre-requisite: the WHITE BRAND has initialized a MONEY-IN using the moneyInWebInit method of DIRECTKIT. The WHITE BRAND server owns a MONEY-IN token now:

  1. The WHITE BRAND server redirects the user to Lemon Way WEBKIT with the MONEY-IN token using a GET
  2. The WEBKIT does some checking and redirects the user on the card payment page
  3. On this payment web page the user can enter the card data
  4. Than a 3D Secure verification is processed if the bank owning the card has a 3D Secure payment for this card
  5. The MONEY-IN transaction is saved and the user is redirected to your WHITE BRAND web site.

Request

This Request is sent to Lemon Way WEBKIT using the following parameters in the query string:

Variable

Description

Mandatory

Format

Example

moneyInToken

Money-in token received in output of moneyInWebInit of DIRECTKIT

Yes

[1:256] char

62612109COhhmoY3kOBhf9O7op8g1m8NE

p

URL of the CSS to customize the payment page
Only for ATOS v1 contracts.

No

https%3A%2F%2Fwww.lemonway.fr%2Fmercanet_lw.css

lang

ISO2 language code for payment page. Non exhaustive lists of accepted codes:
en, no, sp, fr, xz, ge, it, br, da, fi, sw, po, fl, ci, pl, ne

No

[2] char

 
tpl

The name of the template to use on the payment page

Only for ATOS v2 contracts.

No[1:256] charCustom 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

The WHITE BRAND return 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 Lemon Way's server to the WHITE BRAND URL. Data are transmitted in POST.
  • When the CLIENT terminates its operation, he is redirected to the WHITE BRAND URL with data in a GET
For security reasons, in any case of return by the POST, your server has to double check the payment using the GetMoneyInTransDetails method of DIRECTKIT to make sure the payment was done.


POST Answer:

Item

Description

Example

response_code

Answer code:

  • 0000: success
  • 3000: error

0000

response_wkToken

wkToken sent by the WHITE BRAND when initializating the MONEY-IN

rhjzekdzejkd

response_msg

Comment on answer code

response_transactionId

Lemon Way 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 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 by the WHITE BRAND in entry of MONEY-IN initialization.

rhjzekdzejkd