diff --git a/src/Gateway.php b/src/Gateway.php index edf45f1..3ee0aea 100644 --- a/src/Gateway.php +++ b/src/Gateway.php @@ -21,10 +21,6 @@ use Pronamic\WordPress\Pay\Core\PaymentMethod; use Pronamic\WordPress\Pay\Core\PaymentMethods; use Pronamic\WordPress\Pay\Core\PaymentMethodsCollection; -use Pronamic\WordPress\Pay\Fields\CachedCallbackOptions; -use Pronamic\WordPress\Pay\Fields\IDealIssuerSelectField; -use Pronamic\WordPress\Pay\Fields\SelectFieldOption; -use Pronamic\WordPress\Pay\Fields\SelectFieldOptionGroup; use Pronamic\WordPress\Pay\Fields\TextField; use Pronamic\WordPress\Pay\Payments\FailureReason; use Pronamic\WordPress\Pay\Payments\Payment; @@ -110,13 +106,6 @@ public function __construct( Config $config ) { add_action( 'pronamic_payment_status_update', [ $this, 'copy_customer_id_to_wp_user' ], 99, 1 ); // Fields. - $ideal_options = new CachedCallbackOptions( - function () { - return $this->get_ideal_issuers(); - }, - 'pronamic_pay_ideal_issuers_' . \md5( (string) \wp_json_encode( $config ) ) - ); - $field_consumer_name = new TextField( 'pronamic_pay_consumer_bank_details_name' ); $field_consumer_name->set_label( __( 'Account holder name', 'pronamic_ideal' ) ); $field_consumer_name->set_required( true ); @@ -186,11 +175,6 @@ function () { $payment_method_direct_debit_ideal = new PaymentMethod( PaymentMethods::DIRECT_DEBIT_IDEAL ); $payment_method_direct_debit_ideal->add_support( 'recurring' ); - $field_ideal_issuer = new IDealIssuerSelectField( 'pronamic_pay_mollie_direct_debit_ideal_issuer' ); - $field_ideal_issuer->set_options( $ideal_options ); - - $payment_method_direct_debit_ideal->add_field( $field_ideal_issuer ); - $this->register_payment_method( $payment_method_direct_debit_ideal ); // Payment method direct debit and SOFORT. @@ -215,11 +199,6 @@ function () { $payment_method_ideal = new PaymentMethod( PaymentMethods::IDEAL ); $payment_method_ideal->add_support( 'recurring' ); - $field_ideal_issuer = new IDealIssuerSelectField( 'pronamic_pay_mollie_ideal_issuer' ); - $field_ideal_issuer->set_options( $ideal_options ); - - $payment_method_ideal->add_field( $field_ideal_issuer ); - $this->register_payment_method( $payment_method_ideal ); // IN3. @@ -378,23 +357,6 @@ private function maybe_enrich_payment_methods() { } } - /** - * Get iDEAL issuers. - * - * @return iterable - */ - private function get_ideal_issuers() { - $issuers = $this->client->get_issuers(); - - $items = []; - - foreach ( $issuers as $key => $value ) { - $items[] = new SelectFieldOption( $key, $value ); - } - - return $items; - } - /** * Get webhook URL for Mollie. * @@ -746,11 +708,6 @@ private function get_payment_request( Payment $payment ) { $request->set_metadata( $metadata ); - // Issuer. - if ( Methods::IDEAL === $request->method ) { - $request->issuer = $payment->get_meta( 'issuer' ); - } - // Card token. if ( Methods::CREDITCARD === $request->method ) { $card_token = $payment->get_meta( 'mollie_card_token' );