gpt4 book ai didi

iOS Paypal 移动 SDK - 付款证明

转载 作者:太空宇宙 更新时间:2023-11-03 16:07:49 26 4
gpt4 key购买 nike

我在我的应用程序中集成了适用于 iOS 的 Paypal Mobile SDK。

在委托(delegate) Methode completePayment 中,我得到了这个 json:

CurrencyCode: EUR
Amount: 39.95
Short Description: Michaels Test
Intent: sale
Processable: Already processed
Display: €39.95
Confirmation: {
client = {
environment = mock;
"paypal_sdk_version" = "2.12.3";
platform = iOS;
"product_name" = "PayPal iOS SDK";
};
response = {
"create_time" = "2015-10-29T13:18:02Z";
id = "PAY-NONETWORKPAYIDEXAMPLE123";
intent = sale;
state = approved;
};
"response_type" = payment;
}
Details: (null)
Shipping Address: (null)
Invoice Number: (null)
Custom: (null)
Soft Descriptor: (null)
BN code: (null)

它说创建成功。但是当在 developer.paypal.com 中查看我的仪表板时,我看不到任何交易。对于环境,我使用 paypal-sandbox。

在文档中它说我必须使用 rest-api 来验证即时付款:https://developer.paypal.com/docs/integration/mobile/verify-mobile-payment/

那么我是否需要一个后端服务来验证我从客户端创建的付款,或者此时我必须做什么?

谢谢,迈克尔

最佳答案

在此处使用您的沙盒帐户登录... Sandbox Paypal Site .您将能够在 paypal 的沙盒网站上看到在沙盒环境中进行的交易。

查看您的确认消息,您正在以 PayPalEnvironmentNoNetwork 模式运行您的应用。

/// Production (default): Normal, live environment. Real money gets moved.
/// This environment MUST be used for App Store submissions.
extern NSString *const PayPalEnvironmentProduction;
/// Sandbox: Uses the PayPal sandbox for transactions. Useful for development.
extern NSString *const PayPalEnvironmentSandbox;
/// NoNetwork: Mock mode. Does not submit transactions to PayPal. Fakes successful responses. Useful for unit tests.
extern NSString *const PayPalEnvironmentNoNetwork;

您需要在 SandBox 环境中运行您的应用程序。获取 YOUR_CLIENT_ID_FOR_SANDBOX 并使用它初始化您的 PayPal

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

[PayPalMobile initializeWithClientIdsForEnvironments:@{PayPalEnvironmentSandbox : @"YOUR_CLIENT_ID_FOR_SANDBOX"}];
return YES;
}

然后您将能够在上面的链接站点中看到交易。

关于iOS Paypal 移动 SDK - 付款证明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33416061/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com