I'm integrating Stripe payments in an aspx site (VB, .NET 4.7.2). I took Javascripts from Stripe samples. I try to call this method of the backend:
<WebMethod()>
Public Shared Function CreateStripePaymentIntent(ByVal aPrice As String) As PaymentIntent
...
End Function
from a Javascript in the page: (here the parameter is a fixed value, to simplify)
fetch("PayOrder.aspx/CreateStripePaymentIntent?aPrice=111", {
method: "POST",
headers: {
'Accept': 'application/json',
"Content-Type": "application/json"
}
body: JSON.stringify(purchase)
})
If I remove the parameter all works well (but is useless). If I try to pass the parameter I always have error 500: POST http://localhost:14987/PayOrder.aspx/CreateStripePaymentIntent?aPrice=111 Status 500 Internal Server Error Version HTTP/1.1 Transferred 0,98 kB (660 B size) Referrer Policy strict-origin-when-cross-origin
Message "No value for parameter 'aPrice'." (my translation from italian to english!)
Someone can tell me WHY this parameter does not reach the backend?