payment_form
1 year ago
edit_data.php
4 months ago
email_form.php
1 year ago
new_form.php
4 months ago
payment_form.php
1 year ago
summary_before_payment.php
1 year ago
view.php
1 year ago
view_by_key.php
1 year ago
payment_form.php
62 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Copyright (c) 2023 LatePoint LLC. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | /* @var $order OsOrderModel */ |
| 7 | /* @var $invoice OsInvoiceModel */ |
| 8 | /* @var $selected_payment_method string */ |
| 9 | /* @var $selected_payment_processor string */ |
| 10 | /* @var $current_step string */ |
| 11 | /* @var $transaction_intent OsTransactionIntentModel */ |
| 12 | /* @var $errors array */ |
| 13 | /* @var $payment_token string */ |
| 14 | /* @var $form_heading string */ |
| 15 | /* @var $form_prev_button string */ |
| 16 | /* @var $form_prev_button string */ |
| 17 | /* @var $invoice_link string */ |
| 18 | /* @var $receipt_link string */ |
| 19 | /* @var $in_lightbox string */ |
| 20 | /* @var $invoice_access_key string */ |
| 21 | ?> |
| 22 | <?php if(!empty($form_heading)) { ?> |
| 23 | <div class="<?php echo ($in_lightbox == 'yes') ? 'latepoint-lightbox-heading' : 'clean-layout-content-header'; ?>"> |
| 24 | <h2><?php echo esc_html($form_heading); ?></h2> |
| 25 | <a href="#" class="latepoint-lightbox-close" tabindex="0"><i class="latepoint-icon latepoint-icon-x"></i></a> |
| 26 | </div> |
| 27 | <?php } ?> |
| 28 | <div class="<?php echo ($in_lightbox == 'yes') ? 'latepoint-lightbox-content' : 'clean-layout-content-body'; ?> latepoint-payment-step-<?php echo esc_attr($current_step); ?>"> |
| 29 | <?php |
| 30 | |
| 31 | // Output errors if any |
| 32 | if (!empty($errors)){ |
| 33 | echo '<div class="latepoint-message latepoint-message-error">'; |
| 34 | foreach($errors as $error){ |
| 35 | echo '<div>'.$error.'</div>'; |
| 36 | } |
| 37 | echo '</div>'; |
| 38 | } |
| 39 | ?> |
| 40 | <?php |
| 41 | include('payment_form/_'.$current_step.'.php'); |
| 42 | |
| 43 | echo OsFormHelper::hidden_field('invoice_id', $transaction_intent->invoice_id); |
| 44 | echo OsFormHelper::hidden_field('payment_method', $selected_payment_method); |
| 45 | echo OsFormHelper::hidden_field('payment_processor', $selected_payment_processor); |
| 46 | echo OsFormHelper::hidden_field('payment_portion', $invoice->payment_portion); |
| 47 | echo OsFormHelper::hidden_field('payment_token', $payment_token); |
| 48 | echo OsFormHelper::hidden_field('current_step', $current_step); |
| 49 | echo OsFormHelper::hidden_field('in_lightbox', $in_lightbox); |
| 50 | echo OsFormHelper::hidden_field('key', $invoice_access_key); |
| 51 | ?> |
| 52 | </div> |
| 53 | <?php if(!empty($form_prev_button) || !empty($form_next_button) || !empty($invoice_link) || !empty($receipt_link)){ ?> |
| 54 | <div class="<?php echo ($in_lightbox == 'yes') ? 'latepoint-lightbox-footer' : 'clean-layout-content-footer'; ?>"> |
| 55 | <?php |
| 56 | if(false && !empty($form_prev_button)) echo '<button type="button" class="latepoint-btn latepoint-btn-secondary latepoint-btn-position-start">'.$form_prev_button.'</a>'; |
| 57 | if(!empty($form_next_button)) echo '<button type="submit" class="latepoint-btn latepoint-btn-primary latepoint-btn-position-end ">'.$form_next_button.'</a>'; |
| 58 | if(!empty($invoice_link)) echo '<a href="'.esc_url($invoice_link).'" target="_blank" class="latepoint-btn latepoint-btn-primary latepoint-btn-block"><span>'.__('View Invoice', 'latepoint').'</span><i class="latepoint-icon latepoint-icon-external-link"></i></a>'; |
| 59 | if(!empty($receipt_link)) echo '<a href="'.esc_url($receipt_link).'" target="_blank" class="latepoint-btn latepoint-btn-primary latepoint-btn-block"><span>'.__('View Receipt', 'latepoint').'</span><i class="latepoint-icon latepoint-icon-external-link"></i></a>'; |
| 60 | ?> |
| 61 | </div> |
| 62 | <?php } ?> |