我在Windows 8.1上的Wamp Server上使用Laravel Framework上的PayPal-PHP-SDK包,我想知道我是否可以获得PayPal的费用。所以我抛弃了执行的响应,"transaction_fee" {..}
是空的,虽然在他们的文档中它不是空的,并且在响应中有一些错误。
我之所以看到这些错误并且我没有收到transaction_fee
,是因为我在沙盒中创建了这个错误?
Paypal执行回复:
{
"id":"PAY-7HC461155B029844JKWKQICQ",
"create_time":"2015-07-02T09:27:38Z",
"update_time":"2015-07-02T09:27:58Z",
"state":"approved",
"intent":"sale",
"payer":{
"payment_method":"paypal",
"payer_info":{
"email":"XXX@XXX.com",
"first_name":"XXX",
"last_name":"XXX",
"payer_id":"ZTRB28BXCJCTJ",
"shipping_address":{
"line1":"XXX",
"city":"XXX",
"state":"",
"postal_code":"",
"country_code":"XXX",
"recipient_name":"XXX"
}
}
},
"transactions":[
{
"amount":{
"total":"10.00",
"currency":"EUR",
"details":{
"subtotal":"10.00"
}
},
"description":"XXXXXX",
"item_list":{
"items":[
{
"name":"XXX",
"price":"10.00",
"currency":"EUR",
"quantity":"1"
}
],
"shipping_address":{
"recipient_name":"XXX",
"line1":"XXX",
"city":"XXX",
"state":"",
"postal_code":"",
"country_code":"XXX"
}
},
"related_resources":[
{
"sale":{
"id":"217224619C549403J",
"create_time":"2015-07-02T09:27:38Z",
"update_time":"2015-07-02T09:27:58Z",
"amount":{
"total":"10.00",
"currency":"EUR"
},
"payment_mode":"INSTANT_TRANSFER",
"state":"pending",
"reason_code":"RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION",
"protection_eligibility":"ELIGIBLE",
"protection_eligibility_type":"ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE",
"parent_payment":"PAY-7HC461155B029844JKWKQICQ",
"transaction_fee":{
},
"links":[
{
"href":"https://api.sandbox.paypal.com/v1/payments/sale/217224619C549403J",
"rel":"self",
"method":"GET"
},
{
"href":"https://api.sandbox.paypal.com/v1/payments/sale/217224619C549403J/refund",
"rel":"refund",
"method":"POST"
},
{
"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-7HC461155B029844JKWKQICQ",
"rel":"parent_payment",
"method":"GET"
}
]
}
}
]
}
],
"links":[
{
"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-7HC461155B029844JKWKQICQ",
"rel":"self",
"method":"GET"
}
]
}
抱歉我的英语不好。