我通过NSlog显示NSDictionary,结果为 这是您的付款证明:
{
client = {
environment = sandbox;
"paypal_sdk_version" = "1.0.5";
platform = iOS;
"product_name" = "PayPal iOS SDK";
};
payment = {
amount = "190.50";
"currency_code" = USD;
"short_description" = Vegetables;
};
"proof_of_payment" = {
"adaptive_payment" = {
"app_id" = "APP-80W284485P519543T";
"pay_key" = "AP-0W362760MW159460W";
"payment_exec_status" = COMPLETED;
timestamp = "2013-07-25T04:12:46.646-07:00";
};
};
我已经阅读了文件 https://developer.paypal.com/webapps/developer/docs/integration/direct/make-your-first-call/ 从这个链接我得到了PayPal REST API使用OAuth 2.0框架进行授权。现在如何处理这个结果来查看我的paypal帐户(沙盒)中的一些真正流动的交易?接下来做什么?我已经解析了JSON但是如何通过简单地将它们存储在变量中来处理这些值?谢谢
答案 0 :(得分:2)
当您的交易完成Paypal后,您将获得“payKey” 在pay paymentSuccessWithKey委托方法中。您可以在此处调用您的Web服务,将结果存储到服务器中。
#pragma mark PayPalPaymentDelegate methods
-(void)paymentSuccessWithKey:(NSString *)payKey andStatus:(PayPalPaymentStatus)status; {
paymentStatus = PAYMENTSTATUS_SUCCESS;
NSLog(@"...payKey...........%@", payKey);
[self performSelector:@selector(tellserverYouHavePaid:) withObject:payKey afterDelay:0.2];
}
-(void)tellserverYouHavePaid{
//call your web services here
}