locked
500 error internal server error in stripe RRS feed

  • Question

  • User-91993069 posted

    I am working with stripe in asp.net webforms

    I am entering this test number:

    4242 4242 4242 4242

    I am following this below documentation

    https://stripe.com/docs/legacy-checkout/webforms

    I am facing error 500- Internal server error

    Purchase.aspx

    <body>
       <form method="post">
        <script
            src="https://checkout.stripe.com/checkout.js" class="stripe-button"
            data-key="<%= stripePublishableKey %>"
            data-amount="1"
            data-name="Stripe.com"
            data-description="Sample Charge"
            data-locale="auto"
            data-zip-code="true">
        </script>
    </form>
    </body>

    Purchase.aspx.cs

    public partial class Purchase : System.Web.UI.Page
        {
            public string stripePublishableKey = WebConfigurationManager.AppSettings["StripePublishableKey"];
    
            protected void Page_Load(object sender, EventArgs e)
            {
    
                string email = "myemailid*****@gmail.com";
                string stripeToken=null;
    
                if (Request.Form["stripeToken"] != null)
                {
                    var customers = new CustomerService();
                    var charges = new ChargeService();
    
                    var customer = customers.Create(new CustomerCreateOptions
                    {
                        Email = email,
                        Source = stripeToken,
                    }); ;
    
                    var charge = charges.Create(new ChargeCreateOptions
                    {
                        Amount = 1,
                        Description = "Sample Charge",
                        Currency = "usa",
                        Customer = customer.Id
                    });
                    Console.WriteLine(charge);
                }
            }
        }

    see console log browser

    stripe Log:

    when I click on pay button then everytime 3 log created in stripe->logs but one log is 402 errr(my payment is sucessful or not)? 

    I am entering this test number:

    4242 4242 4242 4242

    I am following this below documentation

    https://stripe.com/docs/legacy-checkout/webforms

    which place I am doing wrong?

    my payment is done or not?

    I am not get any successful charge message 

    help

    Tuesday, September 8, 2020 6:26 AM

Answers

  • User-821857111 posted

    The error is not an ASP.NET error. It is an error message returned by the service you are trying to integrate with. You should use their support facility for help: https://support.stripe.com/contact/login

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 8, 2020 6:33 AM