ionic-framework - 如何在 Ionic 中运行我的 'INR' 货币的 PayPal 代码

标签 ionic-framework paypal ionic3

我在我的 Ionic 应用程序中工作,我在我的应用程序中添加了 PayPal native 插件,但是当我在 PayPal 代码中添加“INR”货币时,它没有在真实设备中打开,当我将货币更改为 ' USD' 正在开盘。

这是我的checkout.ts:

 makepaymentp()
  {
    //console.log("Payment");
    this.PayPalMobile.init({
      PayPalEnvironmentProduction: 'YOUR_PRODUCTION_CLIENT_ID',
      PayPalEnvironmentSandbox: '-----------------------------',
    }).then(() => {
      // Environments: PayPalEnvironmentNoNetwork, PayPalEnvironmentSandbox, PayPalEnvironmentProduction
      this.PayPalMobile.prepareToRender('PayPalEnvironmentSandbox', new PayPalConfiguration({
        // Only needed if you get an "Internal Service Error" after PayPal login!
        //payPalShippingAddressOption: 2 // PayPalShippingAddressOptionPayPal
      })).then(() => {
        let payment = new PayPalPayment(this.totalpricec, 'INR', 'Description', 'sale');
        this.PayPalMobile.renderSinglePaymentUI(payment).then(() => {
          // Successfully paid

          // Example sandbox response
          //
          // {
          //   "client": {
          //     "environment": "sandbox",
          //     "product_name": "PayPal iOS SDK",
          //     "paypal_sdk_version": "2.16.0",
          //     "platform": "iOS"
          //   },
          //   "response_type": "payment",
          //   "response": {
          //     "id": "PAY-1AB23456CD789012EF34GHIJ",
          //     "state": "approved",
          //     "create_time": "2016-10-03T13:33:33Z",
          //     "intent": "sale"
          //   }
          // }
        }, () => {
          // Error or render dialog closed without being successful
          console.log("Error or render dialog closed without being successful");
        });
      }, () => {
        // Error in configuration
        console.log("Error in configuration");
      });
    }, () => {
      // Error in initialization, maybe PayPal isn't supported or something else
      console.log("Error in initialization, maybe PayPal isn't supported or something");
    });
  }

我在我的设备上运行该应用程序,它不是针对“INR”运行的,而是针对“USD”运行的。

任何人都可以帮助我如何在 Ionic App 的 PayPal 中运行“INR”代码。

非常感谢任何帮助。

最佳答案

{
  "scope": "https://uri.paypal.com/services/subscriptions https://api.paypal.com/v1/payments/.* https://api.paypal.com/v1/vault/credit-card https://uri.paypal.com/services/applications/webhooks openid https://uri.paypal.com/payments/payouts https://api.paypal.com/v1/vault/credit-card/.*",
  "nonce": "2017-06-08T18:30:28ZCl54Q_OlDqP6-4D03sDT8wRiHjKrYlb5EH7Di0gRrds",
  "access_token": "Access-Token",
  "token_type": "Bearer",
  "app_id": "APP-80W284485P519543T",
  "expires_in": 32398
}

关于ionic-framework - 如何在 Ionic 中运行我的 'INR' 货币的 PayPal 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54841692/

相关文章:

android - Ionic v2 构建应用程序

javascript - date.getDate() 不是函数。 (在 'date.getDate()' 中, 'date.getDate()' 未定义)Ionic 3 中的 FullCalendar

javascript - 禁用 GPS 后 Ionic 3 地理定位不起作用

angular - 如何防止 ion-checkbox 选择相同的项目值?

sqlite - 如何在 Ionic3 上的 SQLite 插件中使用事务?

ios - 获取设备 uuid ionic ios 应用程序

ionic-framework - [错误]运行子流程ionic-app-scripts时发生错误

c# - Paypal payKey 将我带到错误的付款

paypal - 如何更新 Paypal 订阅按钮上的信用卡详细信息

c# - IPN 验证不会在应该失败的时候失败