_methods.php
48 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Copyright (c) 2023 LatePoint LLC. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | /* @var $enabled_payment_methods 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 methods step |
| 15 | * |
| 16 | * @param {OsTransactionIntentModel} transaction intent for a payment |
| 17 | * |
| 18 | * @since 5.1.0 |
| 19 | * @hook latepoint_order_payment__methods_content_before |
| 20 | * |
| 21 | */ |
| 22 | do_action( 'latepoint_order_payment__methods_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 | |
| 28 | foreach ( $enabled_payment_methods as $pay_method_code => $pay_method_processors ) { |
| 29 | $pay_method_info = reset( $pay_method_processors ); |
| 30 | $pay_method_info['css_class'] = $pay_method_info['css_class'] ?? 'lp-payment-trigger-payment-method-selector'; |
| 31 | $pay_method_info['attrs'] = $pay_method_info['attrs'] ?? ' data-holder="payment_method" data-value="' . esc_attr( $pay_method_code ) . '" '; |
| 32 | echo OsStepsHelper::output_list_option( $pay_method_info ); |
| 33 | } |
| 34 | |
| 35 | ?> |
| 36 | </div> |
| 37 | </div> |
| 38 | <?php |
| 39 | /** |
| 40 | * Content for order payment - after payment methods step |
| 41 | * |
| 42 | * @param {OsTransactionIntentModel} transaction intent for a payment |
| 43 | * |
| 44 | * @since 5.1.0 |
| 45 | * @hook latepoint_order_payment__methods_content_after |
| 46 | * |
| 47 | */ |
| 48 | do_action( 'latepoint_order_payment__methods_content_after', $transaction_intent ); |