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 paiement
    579c7def4bb0411da294d9b57c2c1323
  • 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 paiement
  • 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.
Si ce paramètre est rempli, alors l'argent passera par ce wallet avant d'arriver au wallet bénéficiaire (via un tranfert "wallet to wallet")

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.
Si ce paramètre n'est pas rempli, alors le client final devra obligatoirement le renseigner sur le formulaire. Nous vous recommandons de toujours remplir ce paramètre.

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.

  • Si ce paramètre est configuré avec un intervalle (par exemple, 15.30-500.26), alors le client final devra entrer un montant valide (compris dans l'intervalle) dans le formulaire.

  • Si ce paramètre n'est pas rempli, alors le client final peut entrer n'importe quel montant dans le formulaire.

  • Si ce paramètre est rempli avec une valeur précise (par exemple, 15.60), alors le client final n'a pas le choix du montant.

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

returnUrlUrl de redirection après le succès de la procédure de paiement.Non[0:255]http://VotreEntreprise.fr/Succes
cancelUrlUrl redirection après l'annulation de la procédure de paiement.Non[0:255]http://VotreEntreprise.fr/Annule
errorUrlUrl redirection après l'échec de la procédure de paiement.Non[0:255]http://VotreEntreprise.fr/Erreur
firstNamePayer

Prénom du payeur
Si ce paramètre n'est pas rempli, alors le client final devra le renseigner dans le formulaire.

Non[0:255]Jean
lastNamePayer

Nom du payeur
Si ce paramètre n'est pas rempli, alors le client final devra le renseigner dans le formulaire.

Non[0:255]DUPONT
emailPayer

Mail du payeur
Si ce paramètre n'est pas rempli, alors le client final devra le renseigner dans le formulaire.

Non[0:255]jean.dupont@email.com
style

Lien vers un fichier CSS personnalisé
Le fichier doit être accessible publiquement en https

Non[0:255]https://VotreEntreprise.fr/public/paiement.css
atosStyle

Lien vers un fichier CSS personnalisé ATOS
Le fichier doit être accessible publiquement en https

Non[0:255]https://VotreEntreprise.fr/public/atos.css
notifUrlA 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
optionsRéservé pour de futures versionsNon[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".

La même notification peut être envoyée plusieurs fois à votre "notifUrl". Un imposteur peut également envoyer la même notification. Lorsque vous recevez un notification, veuillez confirmer le statu de la transaction avec 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] => ""
    )