Find Jobs
Hire Freelancers

Magento 2 - Payments API Integration

$30-250 AUD

Completed
Posted over 3 years ago

$30-250 AUD

Paid on delivery
1. Get AUTH token POST: {{auth_url}}/client/access_token You will need these following parameters (JSON format) { "grant_type": "client_credentials", "client_id": "", "client_secret": "", "scope": "payments" } Client_id and client_secret are like username and password, I can provide them later on. The response is similar to this: { "token_type": "Bearer", "expires_in": 3600, "access_token": "ey..." } This token is to be used as an Auth bearer token in the header throughout this part. I saved this as {{auth_token}} for future reference 2. Get a PAYMENT token POST: {{base_url}}//{{MerchantID}}/Token/ This step is to generate a unique payment token for this user. The body (json) will have something similar to this: { "FirstName": "", "LastName": "", "Email": "", "Mobile": "", "Address1": "", "Address2": "", "Suburb": "", "State": "", "Postcode": "", "Country": "", "Billing": { "Type": "", "Reference": "" } } This is the info you need to acquire from Magento checkout. The response is something like this: { "Token": "..." } I saved this as {{payment_token}} for future reference 3. Register a CARD POST: {{base_url}}/{{MerchantID}}/Token/{{payment_token}} After you acquired a unique payment token, you have to register a card to this payment token. The body is something like this: { "Integration": "Standard", "URL": { "Success": ".../success/", "Failure": ".../failure/" } } This post request will always return a paymentURL like following: { "Token": "...", "paymentURL": "..." } The paymentURL page is a credit card form where the user can enter his card details. When we have the paymentURL, we can have that opened in a separate window (or same window) that when completed will return to either success or failure on Magento. To my understanding, the response will be in the $_POST to these return URLs. You might need to do some investigating here to find out what's returned. The failure URL would be something like going back to Magento checkout and display the error message. The success URL would be Magento moving to next step., which is to create a transaction. I'll also include the step where we can verify a card and see if it's success / failure 4. Verify a CARD GET: {{base_url}}/{{MerchantID}}/Token/{{payment_token}} After registering a card, we can verify if the card is registered properly. Sample response for registering card - success: { "Token": "...", "Card": { "Type": "...", "Brand": "...", "Number": "......", "Name": "...", "Month": "...", "Year": "...", "IssuingBank": "...", "Country": "..." } } Sample response for registering card - failure: { "Error": true, "Type": "SYSTEM_NOTREGISTERED", "Detail": "transaction declined (invalid CVV)" } 5. Create a TRANSACTION POST: {{base_url}}/{{MerchantID}}/Transaction/ If the card was registered successfully, we can continue on to create a transaction with the amount we want to charge (from the Magento order). Sample request body (json): { "Token": "{{payment_token}}", "Amount": "0.01", "Currency": "...", "BillingAddress": { "Address1": "", "Address2": "", "Suburb": "", "State": "", "Postcode": "", "Country": "..." } } The Payment token is required. The rest of the details can be acquired from Magento order. Note that country is ISO 2 digit (2 letters) Sample response: { "Token": "...", "Transaction": "...", "Reference": "...", "Amount": ..., "Currency": "...", "Status": "FAILED", "Detail": "CARD_DECLINED" } If there was an error, response would be something like this: { "Error": true, "Type": "VALIDATION_TOKEN", "Detail": "Token Not Found" }
Project ID: 27643156

About the project

8 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi, ==== I can Start Immediately==== I am PHP , JS,JQ Expert having 10+ years of Experience Messsage me so we can discuss more. Thanks.
$50 AUD in 1 day
4.9 (39 reviews)
5.4
5.4
8 freelancers are bidding on average $364 AUD for this job
User Avatar
I’m a certified Magento expert and I have a team here with 6 Magento1 and Magento2 certified developers. I can start your project quickly. Kindly give me a message to discuss further. Regards Paul Simon
$250 AUD in 7 days
4.6 (52 reviews)
6.4
6.4
User Avatar
Hi, Alan I have read your project description very carefully, I can integrate the payment as your request. Can you provide me API document url, too? I am ready for your project and I will provide the best service for you. Please feel free to contact me. Hope to be working with you
$300 AUD in 3 days
5.0 (29 reviews)
5.8
5.8
User Avatar
Hello Monali here, I have checked your job description carefully and I keep to get an opportunity to work with you. I have over 4+ years of experience in Magento Theme & Plugin Development & customisation. I can start work on your project on the spot and can give your work with good quality. Thanks
$200 AUD in 5 days
5.0 (20 reviews)
4.3
4.3

About the client

Flag of AUSTRALIA
Melbourne, Australia
5.0
5
Payment method verified
Member since Jun 13, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.