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
{{ message }}
This repository has been archived by the owner on Dec 10, 2022. It is now read-only.
ERROR: The plugin knows for SURE that payment did NOT happen
UNDEFINED: The plugin DOES NOT know if the payment happened
ERROR would be returned for instance if failure occurred PRIOR contacting the gateway or if the establishment of the connection failed. As soon as the plugin were able to connect to the gateway and send some bytes we are in UNKNOWN territory until gateway replies with a meaningful status.
A simplification would be to remove ERROR and ONLY deal with unknown (as we don't guarantee that plugin implementors will correctly return ERROR or UNKNOWN in the right scenario, and therefore assume we can treat those differently).
ERROR: The plugin knows for SURE that payment did NOT happen
[...]
ERROR would be returned for instance if failure occurred PRIOR contacting the gateway or if the establishment of the connection failed. As soon as the plugin were able to connect to the gateway and send some bytes we are in UNKNOWN territory until gateway replies with a meaningful status.
Actually, I think we should raise an exception for payments which did not go through at all (connection error, bugs, etc.) vs the ones which were declined (ERROR), so that we can distinguish between PAYMENT_FAILURE (we tried, but not enough funds, etc.) and PLUGIN_FAILURE (didn't manage to touch the payment method) in analytics.
Proposal for ActiveMerchant exceptions handling. See killbill/killbill#337.
This also addresses #43.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We should take a look at
response#status
if there is no transaction row, to check whether we need to return anUNDEFINED
status or anERROR
one.See https://github.com/killbill/killbill-plugin-framework-ruby/blob/master/lib/killbill/helpers/active_merchant/active_record/models/response.rb#L106.
The text was updated successfully, but these errors were encountered: