【问题标题】:Payments to this merchant are not allowed (invalid clientId) - Ionic iOS不允许向该商家付款(无效的 clientId) - Ionic iOS
【发布时间】:2020-02-07 07:03:19
【问题描述】:

我正在使用 ionic 的 paypal 插件,但不适用于 iOS

我已经在 android 上运行了这个插件,它运行良好,并且在 https://developer.paypal.com/developer/applications/ 上生成了 clientid

doPayment() {
  const total: any = 10;
  const currency: any = 'USD';
  const envProduct: any = '';
  const envSandbox: any = '{Client ID from                                                                  developer.paypal.com/developer/applications/}';

  this.payPal.init({
    PayPalEnvironmentProduction: envProduct,
    PayPalEnvironmentSandbox: envSandbox
  })
  .then(() => {
    // Environments: PayPalEnvironmentNoNetwork,         PayPalEnvironmentSandbox, PayPalEnvironmentProduction
    this.payPal.prepareToRender('PayPalEnvironmentSandbox', new         PayPalConfiguration({
      // Only needed if you get an "Internal Service Error" after         PayPal login!
      // payPalShippingAddressOption: 2 //         PayPalShippingAddressOptionPayPal
        })).then(() => {
          const payment = new PayPalPayment(total, currency,         'Description', 'sale');
          this.payPal.renderSinglePaymentUI(payment).then(async ( res ) =>         {
          // rest of the code after payment
          }, ( errclose ) => {
          console.log( errclose ); // Error or render dialog closed         without being successful
          });
          }, ( errconf ) => {
          console.log( errconf ); // Error in configuration
          });
        }, ( errinit ) => {
          console.log( errinit ); // Error in initialization, maybe PayPal         isn't supported or something else
      });
}

这是错误:

Payments to this merchant are not allowed (invalid clientId)

感谢任何帮助。非常感谢。

【问题讨论】:

  • 您收到什么错误(如果有)?
  • 不允许向该商家付款(clientId 无效)...这是错误...
  • @BryanRojas 你解决了这个问题吗?我的应用程序中出现同样的错误,但尚未找到解决方案

标签: ionic-framework paypal ionic4


【解决方案1】:

当我在运行时使用离子电容器而不是 Cordova 时,我也遇到了同样的错误,仅在 iOS 上。当我使用 Cordova 运行时构建应用程序时,它在两个平台上都能正常工作。此外,在指定 'PayPalEnvironmentSandbox' 环境名称但使用生产 clientId 时,您可能会遇到相同的错误,反之亦然。

【讨论】:

    猜你喜欢
    • 2019-06-05
    • 1970-01-01
    • 1970-01-01
    • 2017-10-14
    • 2014-11-03
    • 2013-10-16
    • 2019-04-14
    • 2015-10-14
    • 2013-08-15
    相关资源
    最近更新 更多