0
我在Web應用中集成了PayPal客戶端快速結賬。使用iOS Web視圖我已經創建了一個應用程序。現在,無論何時點擊PayPal結帳模式,都會彈出並立即關閉。我在ios版本10.3及以上版本中遇到這些問題。 結帳適用於10.3設備以下的所有設備。客戶端集成的PayPal快速結帳
請幫助我解決問題。
這裏是代碼
<div id="paypal-button-container"></div>
<script>
// Render the PayPal button
paypal.Button.render({
// Set your environment
env: 'sandbox', // sandbox | production
// PayPal Client IDs - replace with your own
// Create a PayPal app: https://developer.paypal.com/developer/applications/create
client: {
sandbox: 'XXXXXX,
production: 'XXXXXX'
},
// Wait for the PayPal button to be clicked
payment: function() {
// Make a client-side call to the REST api to create the payment
return paypal.rest.payment.create(this.props.env, this.props.client, {
transactions: [
{
amount: { total: '0.01', currency: 'USD' }
}
]
});
},
// Wait for the payment to be authorized by the customer
onAuthorize: function(data, actions) {
// Execute the payment
return actions.payment.execute().then(function() {
document.querySelector('#paypal-button-container').innerText = 'Payment Complete!';
});
}
}, '#paypal-button-container');
</script>`
請提供你的一些代碼。您提供的信息可能不足以提供答案。 – paolo