Remove bic on ideal

This commit is contained in:
Emili Castells Guasch 2024-08-27 13:03:02 +02:00
parent c9d7bfbe6e
commit a97d37a8f4

View file

@ -119,13 +119,6 @@ class IDealGateway extends WC_Payment_Gateway {
'desc_tip' => true,
'description' => __( 'This controls the description which the user sees during checkout.', 'woocommerce-paypal-payments' ),
),
'bic' => array(
'title' => __( 'BIC', 'woocommerce-paypal-payments' ),
'type' => 'text',
'default' => '',
'desc_tip' => true,
'description' => __( 'Business identification number (BIC) to identify the specific bank.', 'woocommerce-paypal-payments' ),
),
);
}
@ -142,19 +135,13 @@ class IDealGateway extends WC_Payment_Gateway {
$purchase_unit = $this->purchase_unit_factory->from_wc_order( $wc_order );
$amount = $purchase_unit->amount()->to_array();
$payment_source = array(
'country_code' => $wc_order->get_billing_country(),
'name' => $wc_order->get_billing_first_name() . ' ' . $wc_order->get_billing_last_name(),
);
$bic = $this->get_option( 'bic' ) ?? '';
if ( $bic ) {
$payment_source['bic'] = $bic;
}
$request_body = array(
'intent' => 'CAPTURE',
'payment_source' => array(
'ideal' => $payment_source,
'ideal' => array(
'country_code' => $wc_order->get_billing_country(),
'name' => $wc_order->get_billing_first_name() . ' ' . $wc_order->get_billing_last_name(),
),
),
'processing_instruction' => 'ORDER_COMPLETE_ON_PAYMENT_APPROVAL',
'purchase_units' => array(