Amazon ペイメント (Amazon でのログインではなく、支払いのみ) を自分のサイトに統合しようとしています。
支払いの認証フォームを正常に表示できます。
<div id="AmazonPayButton" />
@{
var callbackurl = string.Format("{0}://{1}/Account/AmazonConfirm", Request.Url.Scheme, Request.Url.Authority);
}
<script type="text/javascript">
OffAmazonPayments.Button("AmazonPayButton", "M_MYSELLERID_1234567", {
type: "PwA",
size: "medium",
authorization: function() {
loginOptions =
{scope: "payments:widget", popup: true };
authRequest = amazon.Login.authorize(loginOptions, "@(callbackurl)");
},
onError: function(error) {
alert('We could not connect to Amazon to process your payment, try again later');
}
});
</script>
</div>
認証後、Amazon は私のコールバック URL に正常にリダイレクトされます。しかし、同じ販売者 IDでウォレット ウィジェットを表示しようとすると、「無効な販売者 ID」というエラーが表示されます。
<div id="walletWidgetDiv">
</div>
<script>
new OffAmazonPayments.Widgets.Wallet({
sellerId: 'M_MYSELLERID_1234567',
onReady: function(billingAgreement) {
var billingAgreementId = billingAgreement.getAmazonBillingAgreementId();
},
agreementType: 'BillingAgreement',
design: {
size : {width:'400px', height:'260px'}
},
onPaymentSelect: function(billingAgreement) {
// Replace this code with the action that you want to perform
// after the payment method is selected.
},
onError: function(error) {
alert(error.getErrorMessage());
}
}).bind("walletWidgetDiv");
</script>
ウォレットの表示が拒否されるだけで、認証が機能するのはなぜですか?
彼の回答で@Brent Douglasを更新すると、販売者IDを再確認するようになり、スクリプト参照の1つで間違ったIDを指定していました。次のエラーが表示されます。
「出品者 ID は、リクエストを実行するのに適切な状態ではありません」
それが何を意味するのかわかりません。アカウントを確認したところ、入金/銀行情報が指定されており、統合設定ページには他に何もフラグが立てられていません。アカウントに追加/確認する必要があるものは他にありますか? (一般的なウェブページの URL やその他の情報以外)