set invoice expire time

by sgazelle   Last Updated June 29, 2020 23:09 PM - source

I need to set my gateway invoice expire time to be the same as the "pending payment order lifetime".

So how to get the pending payment order lifetime programmatically to set the invoice expire time and then send this value to the custom gateway.

eg: i want to replace the $cofig->getPendingPaymentOrderOLifetime(); with right code

$minutes = $Configuration->getPendingPaymentOrderOLifetime();

$currentDate = $date->format('Y-m-d\TH:i:s');

$expires = strtotime("$currentDate + $minutes minutes");

$expiryDate = date('Y-m-d\TH:i:s', $expires);

Related Questions

Magento LTV between a certain period

Updated May 24, 2018 16:09 PM