我在我的应用程序中集成了适用于iOS的Paypal Mobile SDK。
在代表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/
那么我需要一个后端服务来验证我从客户端创建的付款,或者此时我必须做什么吗?
THX, 迈克尔
答案 0 :(得分:0)
在此处使用您的沙盒帐户登录... Sandbox Paypal Site。您将能够在PayPal的沙盒网站上查看Sandbox Envirronment上的交易。
查看确认消息,您正在以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;
}
然后,您就可以在上述链接网站中查看交易。