Analyser le résultat du paiement

Pour traiter le résultat du paiement, la Marketplace sera notifiée sur une url fournie à Lyra Collect, attribut : webhook_url.

Un paramètre fourni dans cette notification permettra à la Marketplace de faire un GET ORDER afin de récupérer l'état de l'ORDER et donc savoir si le paiement a réussi.

Exemple de notification (webhook) :
{'order':'515abac9-6cb2-4e21-8a25-b08d7e41e43c'}

Exemple d'appel GET ORDER

GET https://secure.lyra.com/marketplace/orders/515abac9-6cb2-4e21-8a25-b08d7e41e43c/

Exemple de retour GET ORDER

{
     "uuid": "515abac9-6cb2-4e21-8a25-b08d7e41e43c",
     "href": "https://secure.lyra.com/marketplace/orders/515abac9-6cb2-4e21-8a25-b08d7e41e43c",
     "created_at": "2015-03-19T16:30:14.434Z",
     "updated_at": "2015-03-19T16:30:14.434Z",
     "marketplace": "9537e049-8862-400a-ae8d-da2ec9ca6051",
     "reference": "cmd00052",
     "description": "Commande",
     "buyer":[{
          "reference": "nope775",
          "title": "M.",
          "type": "PRIVATE",
          "first_name": "Simone",
          "last_name": "Legendre",
          "phone_number": "02 13 06 95 27",
          "email": "ndurand@tiscali.fr",
          "address": {
               "street_number": "29",
               "street": "rue Besnard",
               "district": "Île-de-France",
               "zipcode": "83819",
               "city": "Roux",
               "state": "Hautes-Pyrénées",
               "country": "FR"}
          }],
     "shipping":[ {
          "delivery_company_name": "DHL",
          "address": {
               "street_number": "493",
               "street": "avenue Duhamel",
               "district": "Saint-Martin",
               "zipcode": "33980",
               "city": "Hamon",
               "state": "Charente-Maritime",
               "country": "FR"},
          "shipping_speed": "EXPRESS",
          "shipping_method": "ETICKET",
          "type": "PRIVATE",
          "first_name": "Luc",
          "last_name": "Leveque",
          "phone_number": "+33 (0)1 46 05 15 89"
	}],
     "amount": null,
     "currency": "EUR",
     "status": "CREATED",
     "webhook_result": null,
     "url_return": "http://www.lyra-sms.com/",
     "links": {
          "items": {
               "href": "https://secure.lyra.com/marketplace/orders/515abac9-6cb2-4e21-8a25-b08d7e41e43c/items"},
          "execute":{
               "href": "https://secure.lyra.com/marketplace/orders/515abac9-6cb2-4e21-8a25-b08d7e41e43c/execute" }
     },
     "vads_transaction_id": 500003,
     "vads_transaction_date": ""	
}