Skip to main content
13 votes
Accepted

Magento2 Rest API Order Flow

I have used a fresh installation for the following using Magento2 CE 2.2.0-dev, and left the default "Luma" theme as well. Concerning external payment methods (gateways) such as MiGS, Braintree, ...
Mahmoud Tantawy's user avatar
12 votes
Accepted

magento 2 order confirmation email sending before payment gatway redirection

I was facing same issue but I found alternative solution like I turned off Magento default Order Confirmation email and Send Order Confirmation Email When Order is being placed Successfully. Here are ...
Ronak Chauhan's user avatar
10 votes
Accepted

Magento 2 Escrow Payment Integration

Vendor/Modulename/etc/config.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Store/etc/config.xsd"> <...
Yuvrajsinh I.T Engineer's user avatar
9 votes
Accepted

Getting additional information (additional_data) form Magento 2 payment Object

So I Finally figured this out. Going by the number of similar questions, I feel it may be of use to a few people Following the example of paypals PayflowProAddCcData observer, I modified my observer ...
Moses N. Njenga's user avatar
9 votes
Accepted

How to post data to a payment provider when placing an order in Magento 2

As @Yogesh said in the comment, it depends on payment gateway and it's API. I see at least few possible solutions with different variations and without API documentation for payment gateway, it would ...
joni jones's user avatar
  • 2,549
8 votes
Accepted

Magento 2: How to set VaultProvider?

After some R&D I got the solution myself. First I created a class in my module: namespace VendorName\ModuleName\Model\Payment; class Payflowpro { public function __construct( \Magento\...
Yogesh Karodiya's user avatar
8 votes
Accepted

Magento 2 Payment method : Add custom Select field that I can use in checkout process

Please follow this blog so you can get idea how to pass data payment form. create configprovider.php and di.xml. I have posted basic code which you can modified as per your requirement. create ...
Yogesh's user avatar
  • 1,523
7 votes
Accepted

How to add custom payment gateway extension in magento2

The common tutorial for adding custom payment integration is still in process, but you can use sample-module-payment-gateway as an example. Also, the off dev doc describes how to add a custom payment ...
joni jones's user avatar
  • 2,549
7 votes
Accepted

Magento 2 Redirect to 3rd party payment gateway with post data

In Magento 2 you have to create custom JavaScript component responsible for redirect to a Payment Provider. So how it works in Magento 2. Custom redirect.html template with "Place Order" button ...
Max Pronko's user avatar
  • 1,775
7 votes

How to post data to a payment provider when placing an order in Magento 2

Here's my final solution to help others that are struggling with this: Part 1: Create a basic module/payment method (http://devdocs.magento.com/guides/v2.2/howdoi/checkout/checkout_payment.html & ...
Lez's user avatar
  • 2,917
7 votes
Accepted

How to bypass CSRF validation for certain requests like payment gateway webhook?

You can add a formKey to your request. Magento checks in the validateRequest function at Magento\Framework\App\Request\CsrfValidator if the request is intance of CsrfAwareActionInterface, not a post ...
gemig_hol's user avatar
  • 871
6 votes

custom place order redirect with ORDERID

In your payment method renderer you can overwrite the afterPlaceOrder function, which gets called directly after successfully placing the order. Basically you should be able to get away with the ...
powlomat's user avatar
  • 171
6 votes

magento 2 order confirmation email sending before payment gatway redirection

This can be achieved by rewriting Magento\Sales\Model\Order\Email\Sender\OrderSender::send function, For that first add the following in your di.xml <preference for="Magento\Sales\Model\Order\...
Arshad M's user avatar
  • 866
6 votes

Is any Payment Gateway exits for overseas customer pay as a dollar for my INR (INDIA) currency based websites

I did a bit of research about it and this is what I understand. Unfortunately PayPal does not seem to be accepted in India to pay in INR. You can use PayPal in India if you want to sell your ...
diazwatson's user avatar
  • 2,440
5 votes

getPayment() method returning boolean

look at the line $order = Mage::getModel('sales/order')->load($OrderId, 'increment_id'); Change that to $order = Mage::getModel('sales/order')->load($orderId, 'increment_id'); Notice how you used a ...
Christian's user avatar
  • 326
5 votes
Accepted

Payment gateway with redirects in magento2

In order to implement custom payment module with redirect you have to implement the following logic: Create Frontend logic responsible for rendering custom payment method with "Place Order" button. ...
Max Pronko's user avatar
  • 1,775
4 votes

MAGENTO 2 REST API Checkout payment using credit card

Please try the below code. "paymentMethod": { "method": "custom_pay", "additional_information": { "cc_cid": "000", "cc_type": "VI", "cc_exp_year": "2017", "...
Kamlesh Jha's user avatar
  • 1,058
4 votes

Magento 2.1.1 An error occured on the server please try again at checkout

To know the exact reason why it is happening so, please open below file: vendor/magento/module-checkout/Model/PaymentInformationManagement.php than comment out the try, catch and put code to place ...
Himmat Paliwal's user avatar
4 votes

Unable to communicate with the PayPal gateway

To solve this issue, you can follow these instructions as below: 1. Disable SSL verification. You go to the Magento backend, then choose rSystem-> Configuration-> Payment Methods and find PayPal ...
Jameslj's user avatar
  • 434
4 votes
Accepted

Magento 2 REST API checkout payment gateway redirect

The fact that this endpoint defines result of the call as single int instead of at least object with order id and extension attribute is awful and probably won't change. We will see what the Magento ...
Zefiryn's user avatar
  • 5,898
4 votes

Authorize.net Direct Post hash validation failed

The answer of philwinkle is fine. In my case additionally the md5-hash which I had set in authorize.net and Magento was too long. It caused a different hash calculation in ...
ahe_borriglione's user avatar
4 votes

Creating order in Magento 2 backend, how to find out the store?

As you can see in the corresponding controller (Magento\Sales\Controller\Adminhtml\Order\Create) you should use next code to get the requested store id: $storeId = $this->getRequest()->getParam(...
Siarhey Uchukhlebau's user avatar
4 votes
Accepted

Magento 2 Authorize payment command

When Magento performs place order actions, it calls authorize or capture (used for sale operation too) payment operation (according to an operation configured for the selected payment method). This ...
joni jones's user avatar
  • 2,549
3 votes

How to create payment gateway module that will redirect to external page

You can find skeleton to integrate custom payment gateway Git Link for Magento_Payment_Gateway_Skeleton Compatible with all magento 1.x version
Gopal Patel's user avatar
  • 3,139
3 votes
Accepted

Invalid Digital Order MIGS Payment Gateway

i have faced the same issue the problem is solved by removing the extra field value i was sending. <input type="hidden" maxlength="15" value="SINGLE" name="vpc_TxSourceSubType"> after changing ...
Qaisar Satti's user avatar
  • 32.5k
3 votes

Redirect to external url after order creation

I think there is no explicitly defined extension point for your scenario. However, you can override the default behavior by creating a plugin on \Magento\Checkout\Controller\Onepage\Success::execute ...
Andrey Konosov's user avatar
3 votes
Accepted

Payment method only admin Magento 2?

We should take a look at the payment abstract class vendor/magento/module-payment/Model/Method/AbstractMethod.php. We can see the method public function isAvailable() - This class will check whether ...
Khoa TruongDinh's user avatar
3 votes

How can I create a Refund gateway?

Well after struggle a lot with the system I discovered how... First we need to have an invoice and a transaction for that invoice. So probably you will want your gateway payment to have authorize or ...
Leo Ribeiro's user avatar
3 votes
Accepted

Magento 2: How to pass the payment method configuration value to the html template

First of all, it's hard to check the json if we don't use a format tool. We can use this website to render json: http://www.jsoneditoronline.org/ Second: I'm going to add and get the new field - ...
Khoa TruongDinh's user avatar
3 votes
Accepted

How does the payment gateway works in Magento 2?

Unfortunately, now Magento has any docs about payment integrations based on Payment Gateway, but docs in progress and should be published in the nearest future. One exception is - How to add a ...
joni jones's user avatar
  • 2,549

Only top scored, non community-wiki answers of a minimum length are eligible