webhooks_requests.rb 1.29 KB
module WebHookPostRequest
 OXXO_CHARGE_CREATED = {
   "data": {
     "object": {
       "id":"5514803f241229981e0022e6", "livemode":false,
       "created_at":1427406911, "status":"pending_payment", "currency":"MXN",
       "description":"Stogies", "reference_id":"9839-wolf_pack",
       "failure_code":null, "failure_message":null, "monthly_installments":null,
       "object":"charge", "amount":20000, "paid_at":null, "fee":812,
       "customer_id":"", "refunds":[], "payment_method": {
         "barcode":"38100000000042290121213001160013",
         "barcode_url":"http://s3.amazonaws.com/cash_payment_barcodes/" \ 
                       "38100000000042290121213001160013.png",
         "object":"cash_payment", "type":"oxxo", "expires_at":1430006400,
         "store_name":"OXXO"
       }, "details": {
         "name":"Wolverine", "phone":"403-342-0642", "email":"logan@x-men.org",
         "line_items":[]
       }
     }, "previous_attributes":{}}, "livemode":false, "webhook_status":"pending",
   "id":"5514803f241229981e0022e9", "object":"event", "type":"charge.created",
   "created_at":1427406911, "webhook_logs":[
     {"id":"webhl_PBmYvkfdNDYKezJ", "url":"http://requestb.in/u3n4ywu3",
      "failed_attempts":0, "last_http_response_status":-1,
      "object":"webhook_log", "last_attempted_at":0}]} 
end