Closed remcotolsma closed 2 years ago
This issue was brought to our attention again via internal HelpScout ticket: https://secure.helpscout.net/conversation/1942250530/24187?folderId=1425710. The customer probably made a mistake while setting up the iDEAL Advanced certificate, but didn't see the underlying error message:
Invalid electronic signature. System generating error: Acquirer
I think we should also combine this directly with the following issue:
The following Gateway
class methods have become somewhat complex over time:
get_issuer_field()
get_transient_issuers()
get_credit_card_issuers()
get_gender_field()
get_birth_date_field()
get_consumer_bank_details_name_field()
get_payment_method()
set_payment_method( $payment_method )
get_input_fields()
get_input_html()
get_form_html()
get_output_fields( Payment $payment )
get_output_html( Payment $payment )
payment_method_is_required()
get_payment_method_field_options( $other_first = false )
get_transient_available_payment_methods( $update_active_methods = true )
get_available_payment_methods()
get_supported_payment_methods()
get_transient_credit_card_issuers()
get_issuers()
I believe we should als abstract the way we use the WordPress https://developer.wordpress.org/apis/handbook/transients/ API.
We know from the iDEAL Advanced integration guide that it is not allowed to request the iDEAL issuers for each transaction:
It is not allowed to perform the Directory protocol for each transaction. Since the list of Issuers only changes occasionally, it is sufficient to execute the Directory protocol on a daily basis and check if the list has changed based on the directoryDateTimestamp. If the Issuer list has changed, the latest version has to be saved and used for any subsequent transaction. Acquirers will normally also inform all Merchants (e.g. by email) about changes in their Issuer list. The Directory protocol should at least be executed once a month.
I think this is less important with, for example, the Mollie API: https://docs.mollie.com/reference/v2/methods-api/list-methods
I believe this has been discussed before, the
Gateway->get_transient_issuers()
method catches exceptions. As a result, as an administrator you will not always see error messages that occur when retrieving the iDEAL issuers.https://github.com/pronamic/wp-pay-core/blob/40a63d75d65abe049f6d769c54bbfad6a3d566aa/src/Core/Gateway.php#L157-L186
This catch was added in https://github.com/pronamic/wp-pay-core/commit/2c9a6bf800da9c14fd353663ef5d853916bcdf91 on March 31, 2022. Probably also necessary because the switch from errors to exceptions has not yet been made properly / completely.
This can be seen, for example, in the Gravity Forms integration:
We should remove the catch from the
Gateway->get_transient_issuers()
method and handle the exceptions downstream.