thephpleague / omnipay-paymentexpress

PaymentExpress driver for the Omnipay PHP payment processing library
MIT License
24 stars 33 forks source link

Pass timeout parameter #59

Open bhaumikpandhi opened 4 years ago

bhaumikpandhi commented 4 years ago

Hello,

I want to pass timeout parameter while creating payment so that customers can only pay within 10 minutes of time.

I've tried few ways but none working.

$gateway = Omnipay::create('PaymentExpress_PxPay');
$gateway->setUsername('username');
$gateway->setPassword('password');

$response = $gateway->purchase([
    'amount' => 100,
    'currency' => 'USD',
    'to' => Carbon\Carbon::now()->timezone('UTC')->addMinutes(1)->format('ymdHi'),
    'returnUrl' => 'returnURL.php'
])->send();

$gateway = Omnipay::create('PaymentExpress_PxPay');

$gateway->setUsername('username');
$gateway->setPassword('password');

$response = $gateway->purchase([
    'amount' => 100,
    'currency' => 'USD',
    'TO' => Carbon\Carbon::now()->timezone('UTC')->addMinutes(1)->format('ymdHi'),
    'returnUrl' => 'returnURL.php'
])->send();

$gateway = Omnipay::create('PaymentExpress_PxPay');

$gateway->setUsername('username');
$gateway->setPassword('password');

$response = $gateway->purchase([
    'amount' => 100,
    'currency' => 'USD',
    'Opt' => "To=".Carbon\Carbon::now()->timezone('UTC')->addMinutes(1)->format('ymdHi'),
    'returnUrl' => 'returnURL.php'
])->send();

Payment express is providing such feature. Added comment/document provided by payment express.

payment-express

Please help.

webwaldo commented 4 years ago

I think this is will be sorted by #55 when it gets merged in.