|
16 | 16 | use Pronamic\WordPress\Pay\Core\PaymentMethod;
|
17 | 17 | use Pronamic\WordPress\Pay\Core\PaymentMethods;
|
18 | 18 | use Pronamic\WordPress\Pay\Core\PaymentMethodsCollection;
|
19 |
| -use Pronamic\WordPress\Pay\Fields\CachedCallbackOptions; |
20 |
| -use Pronamic\WordPress\Pay\Fields\IDealIssuerSelectField; |
21 |
| -use Pronamic\WordPress\Pay\Fields\SelectFieldOption; |
22 | 19 | use Pronamic\WordPress\Pay\Payments\Payment;
|
23 | 20 | use Pronamic\WordPress\Pay\Refunds\Refund;
|
24 | 21 |
|
@@ -68,19 +65,6 @@ public function __construct( Config $config ) {
|
68 | 65 | // Payment method iDEAL.
|
69 | 66 | $ideal_payment_method = new PaymentMethod( PaymentMethods::IDEAL );
|
70 | 67 |
|
71 |
| - $ideal_issuer_field = new IDealIssuerSelectField( 'ideal-issuer' ); |
72 |
| - |
73 |
| - $ideal_issuer_field->set_options( |
74 |
| - new CachedCallbackOptions( |
75 |
| - function () { |
76 |
| - return $this->get_ideal_issuers(); |
77 |
| - }, |
78 |
| - 'pronamic_pay_ideal_issuers_' . \md5( (string) \wp_json_encode( $config ) ) |
79 |
| - ) |
80 |
| - ); |
81 |
| - |
82 |
| - $ideal_payment_method->add_field( $ideal_issuer_field ); |
83 |
| - |
84 | 68 | // Payment methods.
|
85 | 69 | $this->register_payment_method( new PaymentMethod( PaymentMethods::BANCONTACT ) );
|
86 | 70 | $this->register_payment_method( new PaymentMethod( PaymentMethods::CREDIT_CARD ) );
|
@@ -180,26 +164,6 @@ private function maybe_enrich_payment_methods() {
|
180 | 164 | }
|
181 | 165 | }
|
182 | 166 |
|
183 |
| - /** |
184 |
| - * Get iDEAL issuers. |
185 |
| - * |
186 |
| - * @return array<SelectFieldOption> |
187 |
| - */ |
188 |
| - private function get_ideal_issuers() { |
189 |
| - $options = []; |
190 |
| - |
191 |
| - // Maybe update access token. |
192 |
| - $this->maybe_update_access_token(); |
193 |
| - |
194 |
| - $result = $this->client->get_issuers( $this->config->access_token ); |
195 |
| - |
196 |
| - foreach ( $result as $id => $name ) { |
197 |
| - $options[] = new SelectFieldOption( $id, $name ); |
198 |
| - } |
199 |
| - |
200 |
| - return $options; |
201 |
| - } |
202 |
| - |
203 | 167 | /**
|
204 | 168 | * Start.
|
205 | 169 | *
|
@@ -271,15 +235,6 @@ public function start( Payment $payment ) {
|
271 | 235 | $order->set_payment_brand_force( PaymentBrandForce::FORCE_ONCE );
|
272 | 236 | }
|
273 | 237 |
|
274 |
| - // Issuer. |
275 |
| - if ( PaymentBrands::IDEAL === $payment_brand ) { |
276 |
| - $order->set_payment_brand_meta_data( |
277 |
| - (object) [ |
278 |
| - 'issuerId' => $payment->get_meta( 'issuer' ), |
279 |
| - ] |
280 |
| - ); |
281 |
| - } |
282 |
| - |
283 | 238 | // Description.
|
284 | 239 | $description = $payment->get_description();
|
285 | 240 |
|
|
0 commit comments