2017-08-10 82 views
0

目前我正在試圖加入PayPal到我的離子2的應用程序參照this link信用卡是不是在貝寶沙箱付款方式顯示登錄

在貝寶沙箱環境中提到,我不知道爲什麼信用卡是我使用沙盒買家帳戶登錄後,未在我的PayPal付款選項中顯示。

這裏是我的代碼連接到貝寶:

payViaPaypal() { 
    let env = this; 
    this.payPal.init({ 
     PayPalEnvironmentProduction: paypal.PayPalEnvironmentProduction, 
     PayPalEnvironmentSandbox: paypal.PayPalEnvironmentSandbox 
    }).then(() => { 
     env.payPal.prepareToRender(paypal.CurrentEnvironment, new PayPalConfiguration({})).then(() => { 
      let payment = new PayPalPayment('3.33', 'MYR', 'Description', 'sale'); 
      env.payPal.renderSinglePaymentUI(payment).then((result) => { 
       if (result.response.state == "approved") { 
        console.log("Success!") 
       } 
      },() => { 
       console.error('Error or render dialog closed without being successful'); 
      }); 
     },() => { 
      console.error('Error in configuration'); 
     }); 
    },() => { 
     console.error('Error in initialization, maybe PayPal isn\'t supported or something else'); 
    }); 
} 

下面是截圖:
enter image description here

回答

0

該賬戶的信用卡沒有顯示的原因是,我am 使用MYR作爲我的PayPal沙箱環境中的貨幣在PayPal沙盒環境中,只有美元可用於任何信用卡交易,否則,當您使用其他貨幣進行信用卡交易時,您將收到錯誤。因此,在我將貨幣更改爲美元后,一切正常。