贝宝 - 本地结帐SDK(ios) - 无效范围
我正在关注本地结帐sdk https://developer.paypeveloper.paypal.com/limited.com/limited.com/limited -Release/native-Checkout/ios/使用与文档相同的代码
configuartion client ID并返回给定的URL
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
FirebaseApp.configure()
let config = CheckoutConfig(
clientID: "XXX",
returnUrl: "xyz",
environment: .sandbox
)
Checkout.set(config: config)
return true
}
func configurePayPalCheckout() {
print("__________________________________________________________________________________________________")
Checkout.setCreateOrderCallback { createOrderAction in
let amount = PurchaseUnit.Amount(currencyCode: .usd, value: "10.00")
let purchaseUnit = PurchaseUnit(amount: amount)
let order = OrderRequest(intent: .capture, purchaseUnits: [purchaseUnit])
createOrderAction.create(order: order)
}
Checkout.setOnApproveCallback { approval in
approval.actions.capture { (response, error) in
print("Order successfully captured: \(response?.data)")
print("error ::::::::::::::::::::::::::::::::::::::::::::::",error)
}
}
Checkout.setOnCancelCallback {
// User has cancelled the payment experience
print("cancel")
}
Checkout.setOnErrorCallback { error in
// Handle the error generated by the SDK
print("error" , error)
}
}
当我单击PayPal按钮时,它给我以下错误
对此感到抱歉 看来不支持此动作。请返回并报告此错误,以便我们将来可以支持它。 (无效范围)
对此很抱歉 看来不支持此动作。请返回并报告此错误,以便我们将来可以支持它。 (无效的范围)
如果有人面对这个问题,请有帮助 谢谢
I am following Native Checkout SDK https://developer.paypal.com/limited-release/native-checkout/ios/ and using the code same as documentation
Configuartion Client id and return url given
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
FirebaseApp.configure()
let config = CheckoutConfig(
clientID: "XXX",
returnUrl: "xyz",
environment: .sandbox
)
Checkout.set(config: config)
return true
}
func configurePayPalCheckout() {
print("__________________________________________________________________________________________________")
Checkout.setCreateOrderCallback { createOrderAction in
let amount = PurchaseUnit.Amount(currencyCode: .usd, value: "10.00")
let purchaseUnit = PurchaseUnit(amount: amount)
let order = OrderRequest(intent: .capture, purchaseUnits: [purchaseUnit])
createOrderAction.create(order: order)
}
Checkout.setOnApproveCallback { approval in
approval.actions.capture { (response, error) in
print("Order successfully captured: \(response?.data)")
print("error ::::::::::::::::::::::::::::::::::::::::::::::",error)
}
}
Checkout.setOnCancelCallback {
// User has cancelled the payment experience
print("cancel")
}
Checkout.setOnErrorCallback { error in
// Handle the error generated by the SDK
print("error" , error)
}
}
When i click on paypal button it gives me the below error
Sorry about that
Looks like this action is not supported. Please return and report this error so that we can support it in the future. (invalid scope)
If anyone have faced this issue kindly do help
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论