CreatePaymentForm: Créer un formulaire de paiement
Comment cela fonctionne
Vous (MARQUE BLANCHE) utilisez cette fonction pour configurer un nouveau formulaire de paiement. Cela retournera l'ID du nouveau formulaire créé. Par exemple :
Exemple d'ID de formulaire de paiement579c7def4bb0411da294d9b57c2c1323
Combinez cet ID de formulaire de paiement avec votre URL de Webkit, vous obtiendrez le lien vers la page du formulaire de paiement. Par exemple :
Exemples de liens de paiementhttps://webkit.lemonway.fr/mb/YourCompany/prod/payment-page/?fId=579c7def4bb0411da294d9b57c2c1323
ou
https://sandbox-webkit.lemonway.fr/YourCompany/dev/payment-page/?fId=579c7def4bb0411da294d9b57c2c1323
- Maintenant, vous pouvez communiquer ce lien à vos clients finaux
- par mail ou tout autre moyen (à votre convenance)
- en l'intégrant dans votre site ou webview mobile.
- Ce lien est réutilisable.
- LemomWay n'enverra aucune notification au client final après le paiement. C'est à vous de communiquer avec vos utilisateurs.
Requête
XML
<CreatePaymentForm xmlns="Service_mb">
<wlLogin>string</wlLogin>
<wlPass>string</wlPass>
<language>string</language>
<version>string</version>
<walletIp>string</walletIp>
<walletUa>string</walletUa>
<optId>string</optId>
<walletPayer>string</walletPayer>
<walletReceiver>string</walletReceiver>
<amountTot>string</amountTot>
<amountCom>string</amountCom>
<comment>string</comment>
<returnUrl>string</returnUrl>
<cancelUrl>string</cancelUrl>
<errorUrl>string</erroUrl>
<firstNamePayer>string</firstNamePayer>
<lastNamePayer>string</lastNamePayer>
<emailPayer>string</emailPayer>
<style>string</style>
<atosStyle>string</atosStyle>
<notifUrl>string</notifUrl>
<options>string</options>
</CreatePaymentForm>
JSON
{
"wlLogin": "string",
"wlPass": "string",
"language": "string",
"version": "string",
"walletIp": "string",
"walletUa": "string",
"optId": "string",
"walletPayer": "string",
"walletReceiver": "string",
"amountTot": "string",
"amountCom": "string",
"comment": "string",
"returnUrl": "string",
"cancelUrl": "string",
"errorUrl": "string",
"firstNamePayer": "string",
"lastNamePayer": "string",
"emailPayer": "string"
"style": "string"
"atosStyle": "string"
"notifUrl": "string"
"options": "string"
}
Paramètre | Description | Requis | Format | Exemple |
---|---|---|---|---|
optId | Identifiant facultatif du formulaire de paiement. Veuillez éviter les caractères spéciaux. | Non | [0 : 60] | Commande1234 |
walletPayer | Wallet payeur. Ne pas mettre le wallet "sc" ici. Vous ne pouvez créditer le wallet "sc" par carte. | Non | [0 : 100] | 8888 |
walletReceiver | Wallet bénéficiaire. Ne pas mettre le wallet "sc" ici. Vous ne pouvez créditer le wallet "sc" par carte. | Non | [0 : 100] | 9999 |
amountTot | Montant ou intervalle de montant à débiter.
| Non | [0:33] | 15.00 10.00-500.00 |
amountCom | Montant de la commission que la MARQUE BLANCHE souhaite prendre. | Non | 2 decimales | 1.00 |
comment | Commentaire facultatif | Non | [0 :140] | Commande numéro 245 |
returnUrl | Url de redirection après le succès de la procédure de paiement. | Non | [0:255] | http://VotreEntreprise.fr/Succes |
cancelUrl | Url redirection après l'annulation de la procédure de paiement. | Non | [0:255] | http://VotreEntreprise.fr/Annule |
errorUrl | Url redirection après l'échec de la procédure de paiement. | Non | [0:255] | http://VotreEntreprise.fr/Erreur |
firstNamePayer | Prénom du payeur | Non | [0:255] | Jean |
lastNamePayer | Nom du payeur | Non | [0:255] | DUPONT |
emailPayer | Mail du payeur | Non | [0:255] | jean.dupont@email.com |
style | Lien vers un fichier CSS personnalisé | Non | [0:255] | https://VotreEntreprise.fr/public/paiement.css |
atosStyle | Lien vers un fichier CSS personnalisé ATOS | Non | [0:255] | https://VotreEntreprise.fr/public/atos.css |
notifUrl | A la fin de la procédure de paiement, une notification HTTP POST contenant le statu du paiement (PAID, ERROR, CANCEL) est envoyé à cette adresse. Il est possible que la même notification soit envoyée plusieurs fois. | Non | [0:255] | http://login:pass@VotreEntreprise.fr/notif/?origine=lemonway&commandeId=135 |
options | Réservé pour de futures versions | Non | [0:255] |
Réponse
XML
<CreatePaymentFormResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="Service_mb_xml">
<FORM>
<id>579c7def4bb0411da294d9b57c2c1323</id>
<optId>Order1234</optId>
<walletPayer>8888<walletPayer/>
<walletReceiver>9999</walletReceiver>
<walletIp>82.26.79.125</walletIp>
<walletUa>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.3</walletUa>
<amountTotRange>10.00-500.00</amountTotRange>
<amountCom/>
<comment>Commande numéro 245</comment>
<returnUrl>http://YourCompany.com/ThankYou</returnUrl>
<cancelUrl>http://YourCompany.com/PleaseComeBackLater</cancelUrl>
<errorUrl>http://YourCompany.com/Sorry<errorUrl>
<language>fr</language>
<version>1.9</version>
<firstNamePayer>Jean</firstNamePayer>
<lastNamePayer>DUPONT</lastNamePayer>
<emailPayer>jean.dupont@email.com</emailPayer>
<style>https://YourCompany.com/public/payment.css</style>
<atosStyle>https://YourCompany.com/public/atos.css</atosStyle>
<notifUrl>http://login:pass@YourCompany.com/notif/?origine=lemonway&orderId=135</notifUrl>
<options></options>
<active>1</active>
</FORM>
</CreatePaymentFormResult>
JSON
{
"FORM": {
"id": "579c7def4bb0411da294d9b57c2c1323",
"optId": "ooo",
"walletPayer": "8888",
"walletReceiver": "9999",
"walletIp": "163.5.208.226",
"walletUa": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.3",
"amountTot": "",
"amountCom": "",
"comment": "",
"returnUrl": null,
"cancelUrl": null,
"errorUrl": null,
"language": "fr",
"version": "1.1",
"firstNamePayer": "Jean",
"lastNamePayer": "DUPONT",
"emailPayer": "jean.dupont@gmail.com",
"style": "https://MyCompany.com/public/payment.css",
"atosStyle": null,
"notifUrl": null,
"options": null,
"active": "1"
}
}
Notification (notifUrl
)
À la fin de la procédure de paiement, une notification en HTTP POST contenant le statu du paiement (PAID, ERROR, CANCEL) est envoyée à l'adresse "notifUrl".
CompletedPaymentForm
Exemple:
POST:
(
[optId] => ooo
[parentId] => 579c7def4bb0411da294d9b57c2c1323
[parentComment] => test with notif and P2P
[id] => 7e98be392a5e45f6bc357a9ab8c623d2
[walletPayer] => 8888
[walletReceiver] => 9999
[amountTot] => 60.48
[comment] =>
[firstNamePayer] => Jean
[lastNamePayer] => DUPONT
[emailPayer] => jean.dupont@gmail.com
[status] => PAID
[utcdate] => 2016-09-19 13:09:16Z
[created] => 2016-09-19 15:09:12Z
[returnUrl] => ""
[cancelUrl] => ""
[errorUrl] => ""
)