0

我通过 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 框架进行授权。现在如何处理此结果以查看我的贝宝帐户(沙盒)中的一些真实流动交易?接下来做什么?我已经解析了 JSON,但是如何通过简单地将它们存储在变量中来处理这些值?谢谢

4

1 回答 1

2

当您与 Paypal 的交易完成时,您将在 pay paymentSuccessWithKey 委托方法中获得一个“payKey”。您可以在此处调用您的网络服务将结果存储到您的服务器。

#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
}
于 2013-07-25T12:33:23.603 回答