PayNow, adding a link to the QR code url at the order-confirmation email#185
PayNow, adding a link to the QR code url at the order-confirmation email#185mayurkathale merged 3 commits intomasterfrom
Conversation
| <div class="omise omise-paynow-qrcode"> | ||
| <img src="<?php echo $qrcode; ?>" alt="Omise QR code ID: <?php echo $charge['source']['scannable_code']['image']['id']; ?>"> | ||
|
|
||
| if ( 'view' === $context ) : ?> |
There was a problem hiding this comment.
We should exclude this part if order placement has failed.
There was a problem hiding this comment.
Am I understanding correctly that you mean when buyer attempts to scan the QR code and get failed status back from Charge API?
There was a problem hiding this comment.
sorry for the confusion, I wanted to add this comment into other part. consider this for line no 97.
| <?php echo __( 'Scan the QR code to pay', 'omise' ); ?> | ||
| </p> | ||
| <div class="omise omise-paynow-qrcode"> | ||
| <img src="<?php echo $qrcode; ?>" alt="Omise QR code ID: <?php echo $charge['source']['scannable_code']['image']['id']; ?>"> |
There was a problem hiding this comment.
This link downloads the QR image directly which is likely isn't standard flow. Should we create a public link to new page and display QR?
There was a problem hiding this comment.
I actually was 50/50 about this... One side kinda assume that to pay a QR code, probably buyer does not need to open an entire website to scan a code (also it's easier to implement). Another side, for its credibility, maybe we need to render the webpage.
What do you think?
mayurkathale
left a comment
There was a problem hiding this comment.
Few comments above.
| </div> | ||
| </div> | ||
| <?php | ||
| <?php elseif ( 'email' === $context ) : ?> |
There was a problem hiding this comment.
This should be excluded from email content if the charge with failed status.
There was a problem hiding this comment.
From the implementation, buyers will not get into this part of code (thank-you page) if the charge status is failed.
Did you get the result otherwise? (maybe I missed some cases...)
1. Objective
Currently when placing an order using PayNow payment method, the QR code will be shown only on the order-received (thank-you) page.
This pull request is adding the QR code's link to the WC order-confirmation email as well.
Related information:
Related issue(s): T22531 (internal ticket)
2. Description of change
Adding a QR code link to the order-confirmation email when placing a new order using PayNow payment method.
3. Quality assurance
🔧 Environments:
✏️ Details:
An order-confirmation email that is sent by placing a new order using PayNow payment method should contain a link to the PayNow QR code.

4. Impact of the change
Nothing
5. Priority of change
Normal
6. Additional Notes
None