Skip to content

Instantly share code, notes, and snippets.

@deehidayat
Created May 13, 2014 03:13
Show Gist options
  • Save deehidayat/ff5e0e702c2ed1227e8e to your computer and use it in GitHub Desktop.
Save deehidayat/ff5e0e702c2ed1227e8e to your computer and use it in GitHub Desktop.
Response untuk pembayaran menggunakan Credit Card di website PayPal
{
"id": "PAY-84289121AD707525RKNYYTDQ",
"create_time": "2014-05-13T02:55:10Z",
"update_time": "2014-05-13T02:59:22Z",
"state": "approved",
"intent": "sale",
"payer": {
"payment_method": "paypal",
"payer_info": {
"email": "email@credit-card.com",
"first_name": "Given name credit card",
"last_name": "Surename Credit Card",
"payer_id": "HQ7P49863D4H2",
"shipping_address": {
"line1": "address 1 credit card",
"line2": "address 2 credit card",
"city": "",
"state": "",
"postal_code": "12345",
"country_code": "SG",
"recipientName": ""
}
}
},
"transactions": [
{
"amount": {
"total": "30.00",
"currency": "USD",
"details": {
"subtotal": "30.00"
}
},
"description": "Payment for topup 1 credit from WhatIWear for 1 month",
"item_list": {
"items": [
{
"name": "WIW Credit",
"price": "30.00",
"currency": "USD",
"quantity": "1"
}
],
"shipping_address": {
"recipient_name": "Given name credit card Surename Credit Card",
"line1": "address 1 credit card",
"line2": "address 2 credit card",
"city": "",
"state": "",
"postal_code": "",
"country_code": "SG"
}
},
"related_resources": [
{
"sale": {
"id": "0CS21962E98257624",
"create_time": "2014-05-13T02:55:10Z",
"update_time": "2014-05-13T02:59:22Z",
"state": "completed",
"amount": {
"total": "30.00",
"currency": "USD"
},
"parent_payment": "PAY-84289121AD707525RKNYYTDQ",
"links": [
{
"href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/sale\/0CS21962E98257624",
"rel": "self",
"method": "GET"
}, {
"href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/sale\/0CS21962E98257624\/refund",
"rel": "refund",
"method": "POST"
}, {
"href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/payment\/PAY-84289121AD707525RKNYYTDQ",
"rel": "parent_payment",
"method": "GET"
}
]
}
}
]
}
],
"links": [
{
"href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/payment\/PAY-84289121AD707525RKNYYTDQ",
"rel": "self",
"method": "GET"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment