You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like you have set $response to a request. To get the response, you need to "send" it. That does not actually send anything to Sage Pay, but it keeps the steps consistent across different gateways.
$gateway = OmniPay::create('SagePay\Form')->initialize([...]);
$request = $gateway->authorize([...]);
$response = $request->send(); // The step you have have overlooked$response->redirect();
Or for the last step. you can construct your own form or redirect to suit your framework using:
Following your instructions I manage to make it work. Thank you.
Previously I tried the send() method but it required a card, and for Form method I don't have a card to send. My mistake. Also in the card details are stored the billing and shipping information that are required and I didn't thought on this.
Another mistake I made is the encryptionKey. I included a wrong one and I received an encryption error: "openssl_encrypt(): IV passed is 20 bytes long which is longer than the 16 expected by selected cipher, truncating". I then used the correct Form Integration Encryption Password from SagePay and everything went fine.
Hi,
I'm trying to use Laravel 6 with SagePay\Form and, as per the documentation, I have the following:
$gateway = OmniPay::create('SagePay\Form')->initialize([
'vendor' => 'my_vendor',
'testMode' => true,
'encryptionKey' => 'my_encryption_key',
]);
$response = $gateway->authorize([
'amount' => '9.99',
'currency' => 'GBP',
'transactionId' => 12345,,
'returnUrl' => 'https://example.com/success',
'failureUrl' => 'https://example.com/failure',
]);
$response->redirect();
And I get this error Call to undefined method Omnipay\SagePay\Message\Form\AuthorizeRequest::redirect()
When I dd the reponse I have this:
I think I'm missing something but I cannot figure out what, can you guide me please?
The text was updated successfully, but these errors were encountered: