问题
How to get Transaction id from paypal sdk 2.0.1, i searched a lot but i am stuck at getting transaction id from paypal sdk 2.0.1.
check response below;-
{
client =
{
environment = sandbox;
"paypal_sdk_version" = "2.0.1";
platform = iOS;
"product_name" = "PayPal iOS SDK";
};
response =
{
"create_time" = "2014-04-01T07:02:34Z";
id = "PAY-3J588144TJ947892HKM5GJCQ";
intent = sale;
state = approved;
};
"response_type" = payment;
}
Above code i got pay id but not getting transaction id, how can i get transaction id.???
回答1:
You should look at the PayPal SDK documentation to Verify Mobile Payment. Have a closer look to Sale and Transaction object.
Sale
Object has id
field:
id | string ID of the sale transaction.
All you need is to interact with REST API
.
EDIT:
Try to send curl request using NSURLConnection
and NSMutableRequest
as described in examples:
Converting a CURL command for Objective C
Objective-c equivalent of curl request
Basic HTTP Authentication Using iOS
来源:https://stackoverflow.com/questions/22779083/get-transaction-id-from-paypal-sdk-2-0-1