0
私のサンドボックスアプリに問題があります。私は、私のWebアプリでpaypal checkout特急支払いのために与えられたスクリプトを統合しました。これはスクリプトです:Paypal Sandboxアプリのログインエラー
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
<div id="paypal-button-container"></div>
<script>
var total = 0;
$.getJSON("/Home/getTotal", function (result) {
total = result;
});
// Render the PayPal
paypal.Button.render({
// Set your environment
env: 'sandbox', // sandbox | production
// Specify the style of the button
style: {
label: 'buynow',
fundingicons: true, // optional
branding: true // optional
},
// PayPal Client IDs - replace with your own
// Create a PayPal app: https://developer.paypal.com/developer/applications/create
client: {
sandbox: 'AT9iydEDhcqfM_dhU8MR0lvkFgZBjD1oXQVrG-CR9CyK_vd-aXpNzEnyVV7um_hAPrkqQX8JhtjGCbBt'
},
// Wait for the PayPal button to be clicked
payment: function (data, actions) {
return actions.payment.create({
transactions: [
{
amount: { total: total, currency: 'USD' }
}
]
});
},
// Wait for the payment to be authorized by the customer
onAuthorize: function (data, actions) {
return actions.payment.execute().then(function() {
window.alert('Payment Complete!');
});
}
}, '#paypal-button-container');
</script>
このコードはpaypalボタンを表示します。ボタンをクリックすると、支払いページに進むためのログインページが表示されます。問題は:私が持っているpaypalアカウントでこのページにログインすることはできません。私はどこかでこのページにログインするためにサンドボックスのテストアカウントだけを使用することができますが、ペイパルアカウントを持っている人は誰でもこのページにログインできるようにしたいと考えています。私は何をすべきか ?あなたの答えをありがとう!
コードのようにPayPalアプリを作成しましたか? – Claies
はい、私は2つのサンドボックスアプリケーション –
を作成しました。誰もがログインできるようにしたい場合、サンドボックスではなくプロダクションアカウントを使用する必要があります。 – Hosar