Get transaction id from paypal sdk 2.0.1

放肆的年华 提交于 2019-12-24 03:36:09

问题


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:

  1. Converting a CURL command for Objective C

  2. Objective-c equivalent of curl request

  3. Basic HTTP Authentication Using iOS



来源:https://stackoverflow.com/questions/22779083/get-transaction-id-from-paypal-sdk-2-0-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!