Skip to content

Commit

Permalink
Remove $gateway->get_issuer_field() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Jul 8, 2022
1 parent bd49618 commit f8a2637
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions src/Core/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,47 +423,6 @@ public function redirect_via_html( Payment $payment ) {
exit;
}

/**
* Get an issuer field
*
* @return array|null
*/
public function get_issuer_field() {
$field = null;

$payment_method = $this->get_payment_method();

// Set default payment method if needed.
if ( null === $payment_method && $this->payment_method_is_required() ) {
$payment_method = PaymentMethods::IDEAL;
}

// No issuers without payment method.
if ( empty( $payment_method ) ) {
return $field;
}

// Set issuer field for payment method.
switch ( $payment_method ) {
case PaymentMethods::IDEAL:
$issuers = $this->get_transient_issuers();

if ( ! empty( $issuers ) ) {
$field = [
'id' => 'pronamic_ideal_issuer_id',
'name' => 'pronamic_ideal_issuer_id',
'label' => __( 'Choose your bank', 'pronamic_ideal' ),
'type' => 'select',
'choices' => $issuers,
];
}

break;
}

return $field;
}

/**
* Get the payment method to use on this gateway.
*
Expand Down Expand Up @@ -507,9 +466,6 @@ public function get_input_fields() {
*/
$fields = [];

// Issuer field.
$fields[] = $this->get_issuer_field();

// Remove empty input fields.
$fields = array_filter( $fields );

Expand Down

0 comments on commit f8a2637

Please sign in to comment.