Skip to content

jil1710/Stripe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cbimage (2)

Stripe Integration

  • Stripe is a payment service provider that lets merchants accept credit and debit cards or other payments. Its payment processing solution, Stripe Payments, is best suited for businesses that make most of their sales online, as most of its unique features are primarily geared toward online sales.

How does Stripe payment processing work?

  • Stripe processes payments in six steps.

    • The customer provides their card information, either online or in person.

    • Those card details enter Stripe’s payment gateway, which encrypts the data.

    • Stripe sends that data to the acquirer, which is a bank that will process the transaction on the merchant’s behalf. In this step, Stripe serves as the merchant (with the business owner as a submerchant). This means Stripe users don’t have to set up a merchant account, which can be cumbersome.

    • The payment passes through a credit card network, such as Visa or Mastercard, to the cardholder’s issuing bank.

    • The issuing bank approves or denies the transaction.

    • That signal travels from the issuing bank through the card network to the acquirer, then through the gateway to the customer — who sees a message telling them the payment has been accepted or declined.

      image

Let's implement one checkout prototype using stripe integration

  • Step 1 : Create stripe account by clicking stripe dashboard

  • Step 2 : Get Stripe keys

    • At the top of your Stripe Dashboard, you got a link named Developers. Click that and also enable Test mode by switching the button next to Developers.

    image

    image

    • What are the keys used for?

      • The Publishable key is used by the client application. This could be a web or mobile app making connections.
      • The Secret key is used in the authentication process at the backend server (API Server). By default, we use this key to perform any of the requests between our Web API and Stripe.
  • Step 3 : Create Asp.Net Core Web app and in appsettings.json add public key and secret key. After that install below nuget package

    Install through Package Manager Console:

        Install-Package Stripe.net
  • Step 4 : Add Stript Apikey in Program.cs file to interact with stripe account

    image

  • Step 5 : Let's create checkout functionality when user click on checkout the we redirect to stripe payment page as shown in figure.

    • Here is our checkout UI :

      image

    • After Clicking the Checkout button ajax call to Checkout Action Method and After Configuring the stripe UI Page and create checkout session we redirect to stripe payment page

      image image image

    • Here is the stripe UI look like that we setup using above options

      image

    • After Applying the Promocode, here i use JILPATEL as promocode and off 30% amount that i already configure in my stript dashboard.

      image image
      image

    • After filling the card details, we can place the order. For testing click here to get stripe test card.

      image image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published