Код: Выделить всё
paypal.Buttons({
createOrder: function () {
return fetch("CreateOrder.aspx", { method: "post" })
.then(r => r.json()).then(d => d.id);
},
onApprove: function (data) {
return fetch("CaptureOrder.aspx?orderId=" + data.orderID, { method:"post" })
.then(r => r.json()).then(details => alert("Payment: " + details.status));
}
}).render('#paypal-button-container');
Я пытался передать их обратно в Default.aspx, используя строку запроса, например Response.Redirect ("Default.aspx?PayPalError=....") Затем используйте
Подробнее здесь: https://stackoverflow.com/questions/798 ... ttp-errors
Мобильная версия