cancel
Showing results for 
Search instead for 
Did you mean: 

Editing Payment action of the paypal

Editing Payment action of the paypal

Hi Folks, 

 

I am using Magento 2.4.1. In my requirement, I want to change payment_action (authorize, authorize_capture) of the PayPal payment method programmatically for some situations. 

 

Does anybody have any idea about the exact file where we can do the modifications?

 

Thanks! 

2 REPLIES 2

Re: Editing Payment action of the paypal

Hello @Nishu Jindal 

 

In the file vendor\magento\module-paypal\Model\Config.php, you can create the plugin for 

getPaymentAction function and return its value based on your requirement.
 
I hope it helps.
Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: Editing Payment action of the paypal

Go to your App Center. Click View all next to 'Accept Payments'. Click the PayPal buttons tile, then Get Started. Click View your saved buttons TellSubway. Click Action next to the button you want to edit and select Edit button.