_processors.php
48 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Copyright (c) 2023 LatePoint LLC. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | /* @var $enabled_payment_processors array */ |
| 7 | /* @var $form_prev_button string */ |
| 8 | /* @var $form_next_button string */ |
| 9 | /* @var $transaction_intent OsTransactionIntentModel */ |
| 10 | /* @var $errors array */ |
| 11 | ?> |
| 12 | <?php |
| 13 | /** |
| 14 | * Content for order payment - before payment processors step |
| 15 | * |
| 16 | * @param {OsTransactionIntentModel} transaction intent for a payment |
| 17 | * |
| 18 | * @since 5.1.0 |
| 19 | * @hook latepoint_order_payment__processors_content_before |
| 20 | * |
| 21 | */ |
| 22 | do_action( 'latepoint_order_payment__processors_content_before', $transaction_intent ); |
| 23 | ?> |
| 24 | <div class="lp-payment-methods-w"> |
| 25 | <div class="lp-options lp-options-grid lp-options-grid-three"> |
| 26 | <?php |
| 27 | foreach ( $enabled_payment_processors as $pay_processor_code => $pay_processor ) { |
| 28 | $pay_processor['label'] = $pay_processor['front_name'] ?? $pay_processor['name']; |
| 29 | $pay_processor['css_class'] = $pay_processor['css_class'] ?? 'lp-payment-trigger-payment-processor-selector'; |
| 30 | $pay_processor['attrs'] = $pay_processor['attrs'] ?? ' data-holder="payment_processor" data-value="' . esc_attr( $pay_processor_code ) . '" '; |
| 31 | $form_content = OsStepsHelper::output_list_option( $pay_processor ); |
| 32 | } |
| 33 | ?> |
| 34 | </div> |
| 35 | </div> |
| 36 | |
| 37 | <?php |
| 38 | /** |
| 39 | * Content for order payment - after payment processors step |
| 40 | * |
| 41 | * @param {OsTransactionIntentModel} transaction intent for a payment |
| 42 | * |
| 43 | * @since 5.1.0 |
| 44 | * @hook latepoint_order_payment__processors_content_after |
| 45 | * |
| 46 | */ |
| 47 | do_action( 'latepoint_order_payment__processors_content_after', $transaction_intent ); |
| 48 |