我是paypal与目标c整合的新手。
点击购买按钮。控制台显示付费成功:
以下是您的付款证明:
{
client =
{
environment = mock;
"paypal_sdk_version" = "2.16.3";
platform = iOS;
"product_name" = "PayPal iOS SDK";
};
response = {
"create_time" = "2017-04-05T05:49:16Z";
id = "PAY-NONETWORKPAYIDEXAMPLE123";
intent = sale;
state = approved;
};
"response_type" = payment;
}
但问题是:我无法在浏览器的沙箱帐户中看到此活动。
答案 0 :(得分:1)
如果您在应用程序中添加了PalPalSDK。您必须在Sandbox或Production之间进行选择。你必须为Palpal创建AppID。您可以在那里检查它是否也有示例代码。 如果付款获得成功,它有委托方法,我们可以通过付款成功查看。
- (void)sendCompletedPaymentToServer:(PayPalPayment *)completedPayment {
// TODO: Send completedPayment.confirmation to server
NSLog(@"Here is your proof of payment:\n\n%@\n\nSend this to your server for confirmation and fulfillment.", completedPayment.confirmation);
}
答案 1 :(得分:0)
在这里,您可以获得paypal付款后的所有数据
- (void)payPalPaymentViewController:(PayPalPaymentViewController *)paymentViewController didCompletePayment:(PayPalPayment *)completedPayment
{
NSLog(@"PayPal Payment Success!");
self.resultText = [completedPayment description];
[self sendCompletedPaymentToServer:completedPayment]; // Payment was processed successfully; send to server for verification and fulfillment
[self dismissViewControllerAnimated:YES completion:nil];
}