Skip to content

Commit

Permalink
Added instructions in thank you page for promptpay payment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aashish committed Sep 28, 2023
1 parent 021d7ce commit 94c88f3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
10 changes: 10 additions & 0 deletions assets/css/omise-css.css
Original file line number Diff line number Diff line change
Expand Up @@ -595,3 +595,13 @@ line-height: 2;
width: 100%;
margin-bottom: 1rem;
}

.qr-alert-box {
padding: 15px;
margin: 20px 0;
border: 1px solid black;
}

.align-left {
text-align: left;
}
14 changes: 13 additions & 1 deletion includes/gateway/class-omise-payment-promptpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,23 @@ public function display_qrcode( $order, $context = 'view' ) {

if ( 'view' === $context ) : ?>
<div id="omise-offline-additional-details" class="omise omise-additional-payment-details-box omise-promptpay-details" <?php echo 'email' === $context ? 'style="margin-bottom: 4em; text-align:center;"' : ''; ?>>
<p><?php echo __( 'Scan the QR code to pay', 'omise' ); ?></p>
<p><strong><?php echo __( 'Scan the QR code to pay', 'omise' ); ?></strong></p>

<div class="qr-alert-box">
<p><strong>Please follow the instructions below to make payment:</strong></p>
<ul class="align-left">
<li>Download the QR code or open your preferred bank app to scan it</li>
<li>Check that the payment details are correct</li>
<li>Import the QR code image into your bank app or scan the QR code with your bank app to pay.</li>
<li>Share the payment slip from your bank app to the seller</li>
</ul>
</div>

<div class="omise omise-promptpay-qrcode" alt="Opn Payments QR code ID: <?php echo $charge['source']['scannable_code']['image']['id']; ?>">
<?php $this->load_qr_svg_to_DOM($qrcode, 'omise-promptpay-qrcode-svg') ?>
</div>
<a id="omise-download-promptpay-qr" class="omise-download-promptpay-qr" href="<?php echo $qrcode ?>" download="qr_code.svg">Download QR</a>

<div>
<?php echo __( 'Payment expires in: ', 'omise' ); ?>
<?php echo wc_format_datetime( $expires_datetime, wc_date_format() ); ?>
Expand Down

0 comments on commit 94c88f3

Please sign in to comment.