Authorize.net
Платёжный провайдер Authorize.Net от Visa
Payment-Authorize.net-Medusa
Dear Developers and E-commerce Enthusiasts,
Are you ready to revolutionize the world of online stores with MedusaJS? We have an exciting opportunity that will make payment processing a breeze for our beloved Medusa platform! Introducing the Payment-Authorizenet provider, a community-driven project that brings the immensely popular Authorize.net payment gateway to our MedusaJS commerce stack.
What's in it for You?
🚀 Streamline Payment Processing: With payment-authorizenet-medusa, you can unleash the full potential of Authorize.net's features, ensuring seamless and secure payments for your customers.
Features:
Authorize Payment : Authorize funds on a customer's card without immediate charge.
Capture Payment : Charge the previously authorized funds.
Auth-and-Capture : Authorize and capture funds in a single seamless step.
Cancel Payment : Cancel an authorization before the payment is captured.
Void Payment : Void a transaction before it has been settled.
Refund Payment : Process refunds for transactions that have already been settled.
Installation Made Simple
No hassle, no fuss! Install Payment-Authorizenet effortlessly with npm:
Authorize.net an immensely popular payment gateway with a host of features. This provider enables the Authorize.net payment interface on Medusa commerce stack
Installation
Use the package manager npm to install Payment-Authorizenet.
Usage
Register for a Authorize.net account and generate the api keys In your environment file (.env) define the API Login ID and Transaction Key:
You need to add the provider into your medusa-config.ts as shown below:
Client side configuration
For the NextJs start, make the following changes
Step 1.
Install package to your next starter. This simplifies the process by importing all the scripts implicitly
or
Step 2.
Add environment variables in the client (storefront) (.env) file:
Note : To generate the Client Key, log in to the Merchant Interface as an Administrator and navigate to Account > Settings > Security Settings > General Security Settings > Manage Public Client Key
Step 3.
Add /src/lib/constants.tsx
Step 4.
Add a AuthoirizenetCardConatiner in /src/modules/checkout/components/payment-conatiner/index.tsx
Step 5.
add AuthorizeNetCardContainer in the client /src/modules/checkout/components/payment/index.tsx
Step 6.
modify initiatePaymentSession in the client /src/modules/checkout/components/payment/index.tsx
Step 7.
Create a button for Autorize.net /src/modules/checkout/components/payment-button/authorizenet-payment-button.tsx
like below
Step 8.
Add into the payment element /src/modules/checkout/components/payment-button/index.tsx
then
watch out
Caveat the default starter template has an option which says use the same shipping and billing address please ensure you deselect this and enter the phone number manually in the billing section.
For more info on medusa modules. Please refer https://docs.medusajs.com/learn
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Disclaimer
The code was tested on limited number of usage scenarios. There maybe unforseen bugs, please raise the issues as they come, or create pull requests if you'd like to submit fixes.

