查询付款/v1/payments/payment/PAY-9J02491382988403BK3BMC6I(在用户批准之前):
{
"id": "PAY-9J02491382988403BK3BMC6I",
"intent": "sale",
"state": "created",
"cart": "07U14103P0008801U",
"transactions": [ {
"amount": {
"total": "80.00",
"currency": "USD"
},
"payee": {"email": "USM@email.com"},
"invoice_number": "55a460ff696br",
"item_list": {
"items": [
{
"name": "Test Ticket 1",
"sku": "55a460ff65f13",
"price": "10.00",
"currency": "USD",
"quantity": 1
},
{
"name": "Test Ticket 2",
"sku": "55a460ff66c7a",
"price": "20.00",
"currency": "USD",
"quantity": 2
},
{
"name": "Test Ticket 3",
"sku": "55a460ff66ce2",
"price": "10.00",
"currency": "USD",
"quantity": 3
}
],
"shipping_address": {
"recipient_name": "Test Name",
"line1": "Main St 1",
"city": "San Jose",
"state": "CA",
"postal_code": "95131",
"country_code": "US"
}
},
"related_resources": [],
"notify_url": "https://bt-pduan-1.c9.io/ipn.php"
}],
"redirect_urls": {
"return_url": "http://localhost:80/getpaypal?paymentId=PAY-9J02491382988403BK3BMC6I",
"cancel_url": "http://localhost:80/cancel"
},
"create_time": "2016-02-16T06:28:08Z",
"update_time": "2016-02-16T06:28:08Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-9J02491382988403BK3BMC6I",
"rel": "self",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-9J02491382988403BK3BMC6I/execute",
"rel": "execute",
"method": "POST"
},
{
"href": "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-07U14103P0008801U",
"rel": "approval_url",
"method": "REDIRECT"
}
]
}
在用户批准后查找付款(我正在删除一些 JSON 内容,例如交易/url 数组以提高可读性):
{
"id": "PAY-9J02491382988403BK3BMC6I",
"intent": "sale",
"state": "created",
"cart": "07U14103P0008801U",
"payer": {
"payment_method": "paypal",
"status": "VERIFIED",
"payer_info": {
"email": "USP@email.com",
"first_name": "Payer",
"last_name": "US",
"payer_id": "8FMFQ2KVYYHTY",
"shipping_address": {
"recipient_name": "Test Name",
"line1": "Main St 1",
"city": "San Jose",
"state": "CA",
"postal_code": "95131",
"country_code": "US"
},
"phone": "408-743-9795",
"country_code": "US",
"billing_address": {
"line1": "1 Main St",
"line2": "",
"city": "San Jose",
"state": "CA",
"postal_code": "95131",
"country_code": "US"
}
}
},
"transactions": [],
"redirect_urls": {},
"create_time": "2016-02-16T06:28:08Z",
"update_time": "2016-02-16T06:28:08Z",
"links": []
}