Note that there are some explanatory texts on larger screens.

plurals
  1. POOmnipay with 3D secure
    text
    copied!<p>I'm trying to create a custom gateway using <a href="https://github.com/adrianmacneil/omnipay" rel="nofollow">omnipay</a> for an unsupported payment gateway. However I'm having a difficult time creating the response class for my provider's 3D secure implementation.</p> <p>I've had a look at sagepay, but the response for 3D secure seems to all be returned in 1 api request.</p> <p>To complete a 3D secure payment I need to perform the following actions:</p> <ol> <li>API request to check if the card is enrolled in 3D secure</li> <li>Redirect the user (POST - Hidden Form) to a url</li> <li>API request to verify the 3D secure value</li> <li>Make the payment (PurchaseRequest)</li> </ol> <p>Do I need a different response classes for each api request? So VerifyEnrolledResponse, VerifySigResponse and PurchaseResponse?</p> <p>or do I need something like this:</p> <pre><code>if ($response-&gt;isSuccessful()) { // payment was successful } elseif ($response-&gt;isRedirect()) { // redirect to offsite payment gateway $response-&gt;redirect(); } elseif ($response-&gt;notEnrolled() { // User not enrolled in 3D secure - make auth or display error } elseif ($response-&gt;3DSecureSuccess() { // Card passed 3D secure } else { // payment failed: display message to customer echo $response-&gt;getMessage(); } </code></pre> <p>Really lost here, I want to keep it abstracted with isSuccessful(), isRedirect() etc. Any help is really appreciated.</p> <p>Documentation: <a href="https://resourcecentre.globaliris.com/documents/pdf.html?id=98" rel="nofollow">https://resourcecentre.globaliris.com/documents/pdf.html?id=98</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload