GetCompletedPaymentForm: Obtenir les détails d'un formulaire de paiement complété
Cette fonction vous permet de retrouver le statu d'un "formulaire de paiement complété (ou rempli)"
Scénario
- En utilisant la fonction CreatePaymentForm, vous (MARQUE BLANCHE) avez généré un formulaire de paiement ré-utilisable (avec son ID, par exemple :
579c7def4bb0411da294d9b57c2c1323
) - Quelques clients ont rempli le formulaire et ont fait le paiement.
- Chaque fois qu'un client termine le formulaire et clic sur le bouton "Accepter et Payer", LemonWay enregistre le formulaire complété et lui génère un nouvel ID, par exemple
7e98be392a5e45f6bc357a9ab8c623d2
- Le statu initial d'un "formulaire complété" est
PENDING
. Lorsque le client termine le processus de paiement, le statu change àPAID
. Il peut aussi changer àCANCEL
ouERROR
.
Dans cet exemple, le formulaire complété 7e98.. a été créé à partir du formulaire parent 579c.. Le formulaire 579c.. est réutilisable, ce qui signifie qu'il peut être complété plusieurs fois par différents clients. Il peut donc exister beaucoup de version complétée.
Cette fonction vous permet de retrouver le statu d'un formulaire par son ID (7e98..).
Requête
XML
<GetCompletedPaymentForm xmlns="Service_mb">
<wlLogin>string</wlLogin>
<wlPass>string</wlPass>
<language>string</language>
<version>string</version>
<walletIp>string</walletIp>
<walletUa>string</walletUa>
<formId>string</formId>
</GetCompletedPaymentForm>
JSON
{
"wlLogin": "string",
"wlPass": "string",
"language": "string",
"version": "string",
"walletIp": "string",
"walletUa": "string",
"formId": "string",
}
Elément | Description | Requis | Format | Exemple |
---|---|---|---|---|
formId | Filled form Id | Oui | 32 | 7e98be392a5e45f6bc357a9ab8c623d2 |
Réponse
XML
<SetPaymentFormStatusResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="Service_mb_xml">
<form>
<id>string</id>
<optId>string</optId>
<parentId>string</parentId>
<parentComment>string</parentComment>
<walletPayer>string</walletPayer>
<walletReceiver>string</walletReceiver>
<amountTot>string</amountTot>
<comment>string</comment>
<firstNamePayer>string</firstNamePayer>
<lastNamePayer>string</lastNamePayer>
<emailPayer>string</emailPayer>
<status>PENDING | PAID | ERROR | CANCEL</status>
<utcdate>2016-09-20 14:58:09Z</utcdate>
<created>2016-09-19 15:09:12Z</created>
<returnUrl>string</returnUrl>
<cancelUrl>string</cancelUrl>
<errorUrl>string</errorUrl>
</form>
</SetPaymentFormStatusResult>
JSON
{
"form": {
"id": string,
"optId": string,
"parentId": string,
"parentComment": string,
"walletPayer": string,
"walletReceiver": string,
"amountTot": string,
"comment": string,
"firstNamePayer": string,
"lastNamePayer": string,
"emailPayer": string,
"status": "PENDING | PAID | ERROR | CANCEL",
"utcdate": string,
"created": string,
"returnUrl": string,
"cancelUrl": string,
"errorUrl": string,
}
}
Dans la réponse :
id
est l'ID du formulaire complété (7e98.. dans notre exemple)parentId
est l'ID du formulaire que vous avez créé avec la fonction CreatePaymentForm (579c.. dans notre exemple)