Closed benrolfe closed 7 years ago
Fixed! When sending the purchase array, ensure that you send a transactionId.
$response = $gateway->purchase([ 'transactionId' => time(), 'amount' => '15.00', 'currency' => 'GBP', 'returnUrl' => route('checkout-worldpay') ])->send();
Be aware that time()
has a resolution of just one second, so two payments at once could result in a duplicate ID.
After I submit a purchase and follow the redirect, the WorldPay redirect page states:
"No cart ID supplied with the payment request."
I was expecting to be able to set this with
$gateway->setCartId( time() )
, but this isn't a method.How can I resolve this?