Jump to content

Stripe Module v2.0.3 capture issue - big problem!


Recommended Posts

The latest version of the Official Stripe Payments Module v2.0.3 has a big problem. It only allows for simultaneous auth & capture at the time of sale.

Like a lot of sellers we opt to authorise at time of sale and then capture, once the goods are sent. This helps prevent problems when an item is temporarily out of stock, or there are handling delays.

In the old version it was comparatively simple to edit the code to change the default behaviour by adding "capture" => false, in two places in the strip_official.php file at public function chargeWebhook(array $params) & public function chargev2(array $params)

In v2.0.3 I have added in stripe_official.php in protected function retrievePaymentIntent($amount, $currency) a capture_method statement:

try {
            $intent = \Stripe\PaymentIntent::create(array(
                "amount" => $amount,
                "currency" => $currency,
                "payment_method_types" => array($options),
               "capture_method" => 'manual',   //* ADDED MANUAL CAPTURE **/
            ));

This creates an authorised payment with the ablity to charge later on the Stripe server control panel payment tab, but the order is not passed back to complete on Prestashop.

What am I missing?

 

Thanks

Baz

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...