stripe not working.NullReferenceExceptionObject reference not set to an instance of an object

Thibaut Fabrice 20 Reputation points
2024-11-18T05:47:17.8866667+00:00

Hi,

Thanks for the help. However, My stripe is not loading. Any help. There is an error: Object not set to an instance of an object.

Screenshot (460)

Github Link:https://github.com/Thibaut501/Mango

Awaiting your reply,

Best Regards,

Fabrice

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,487 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Anonymous
    2024-11-18T08:55:26.0066667+00:00

    Hi,@Thibaut Fabrice. Welcome to Microsoft Q&A. 

    Correct the name below:

    First

    Picture1

    public double O5rderTotal { get; set; }
    

    To

    public double OrderTotal { get; set; }
    

    Second

    In the Mango_Order database, the O5rderTotal of dbo.OrderHeaders should also be changed to OrderTotal.Picture2

    Third

    Picture3

    config.CreateMap<OrderDetailsDto, OrderDetailsDto>().ReverseMap();
    

    To

    config.CreateMap<OrderDetails, OrderDetailsDto>().ReverseMap();
    

    FourthPicture5

    StripeRequestDto  stripeResponseResult = JsonConvert.DeserializeObject<StripeRequestDto>
                        (Convert.ToString(response.Result));
    

    To

    StripeRequestDto  stripeResponseResult = JsonConvert.DeserializeObject<StripeRequestDto>
        (Convert.ToString(stripeResponse.Result));
    

    Use the correct SecretKey

    First

    In my test, the SecretKey in your project seems to be unavailable. I used the SecretKey on the official website for testing.Picture4

    "SecretKey": "sk_test_tR3PYbcVNZZ796tH88S4VQ2u"
    

    You could use the above SecretKey for testing. It is better to get your own SecretKey from the official website.

    Operation Results:

    Picture6


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Thibaut Fabrice 20 Reputation points
    2025-05-06T16:34:32.2733333+00:00

    please help remove this error.

    Thanks,

    Fabrice

    Github link:https://github.com/Thibaut501/Mango

    remove error from screenshot.

    The Stripe is not loading.

    Any help Awaiting urgent reply,

    Screenshot (940)

    0 comments No comments

  3. Thibaut Fabrice 20 Reputation points
    2025-05-20T18:35:28.84+00:00

    Hi,

    Can you reply to me. Its urgent.

    Thanks,

    Awaiting your reply,

    Still stuck.

    Github link:Thibaut501/mango

    Regards,

    Fabrice

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.