我尝试将 Phonepe Payment sdk 集成到 flutter 应用程序中,它在 android 中运行良好,但在 iOS 中我得到
PhonePePayment.HTTPClientError error 0
我该如何解决这个问题?有人这样做过吗?有什么解决办法吗?
我包含了软件包:phonepe_ payment_sdk:^1.0.4
将此添加到我的 info.plist 中:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleURLSchemes</key>
<array>
<string>amzn-$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<string>juspay-$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).cred</string>
<string>paytm-$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
</dict>
<dict>
<key>CFBundleURLName</key>
<string>com.PhonePe-iOS-Intent-SDK-Integration</string>
<key>CFBundleURLSchemes</key>
<array>
<string>iOSIntentIntegration</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>ppemerchantsdkv1</string>
<string>ppemerchantsdkv2</string>
<string>ppemerchantsdkv3</string>
<string>paytmmp</string>
<string>gpay</string>
<string>credpay</string>
<string>phonepe</string>
<string>tez</string>
<string>paytm</string>
<string>bhim</string>
<string>devtools</string>
<string>myairtel</string>
</array>
这是我以 base64 形式传递给交易 api 的主体:
body = {
"merchantId": merchantId,
"merchantTransactionId": uuid.v1().toString().substring(0, 18),
"merchantUserId": user.userId,
"amount": amount * 100,
"redirectUrl": "https://webhook.site/redirect-url",
"redirectMode": "REDIRECT",
"callbackUrl": callBackUrl,
"mobileNumber": user.phoneNumber,
"paymentInstrument": {
"type": "PAY_PAGE",
}
};
您可以分享您的付款页面代码吗?