omise-php icon indicating copy to clipboard operation
omise-php copied to clipboard

Add a programmatic way to check whether the 3D Secure validation is enabled for a given Omise account

Open dmitrii-fediuk opened this issue 9 years ago • 3 comments

dmitrii-fediuk avatar Dec 24 '16 06:12 dmitrii-fediuk

Hi Dmitry, Currently it's not possible to know if 3DSecure is enabled or not via API. If that is what you wanted to know. Neither by the charge object there is a way to know programmatically. If you have to implement a solution that would work for both type of accounts, our recommendation for now is to always pass the return_uri and always redirect the customer. If the account is non-3ds, then the redirect will still work but skip the bank 3DS authentication. We are aware of this limitation and have plans to improve it. Cheers.

fred avatar Jan 19 '17 04:01 fred

Is it right to think, that if the status of a charge is "success" then it is not 3D Secure? I am handling this issue it that way at the moment.

  • omise.js to retrieve a token
  • form processing charges the token
  • if status = success then it's paid and not 3d secure
  • if status = pending then it's 3d secure and the payment is not yet received
  • any other status is failed.

after a while then I check for the charge and see if it's still pending or changed to success or failure.

The main issue here is, that if 3d secure is enabled we don't have a sale yet when the customer arrives at the return_uri.

davidsneighbour avatar Oct 11 '18 12:10 davidsneighbour

@pkollitsch yes, it can be assumed that if the charge status is pending means the charge process (might) requires a 3-D Secure validation.

More accurately can be: if

$charge['status']     = pending
$charge['authorized'] = false
$charge['paid']       = false

then we can redirect user out to charge.authorize_uri.

guzzilar avatar Oct 11 '18 13:10 guzzilar