Skip to content

Refresh QR payment screen once customer completes payment#198

Merged
mayurkathale merged 5 commits intomasterfrom
paynow-refresh
Dec 1, 2020
Merged

Refresh QR payment screen once customer completes payment#198
mayurkathale merged 5 commits intomasterfrom
paynow-refresh

Conversation

@mayurkathale
Copy link
Copy Markdown
Contributor

1. Objective

This PR is to removes QR code from order success page and show actual status of payment in real time, once customer scans the QR code and make the payment. Timeout of 10 minutes has been added on the order success page to keep checking status of charge.

Payment Pending screen:

Screen Shot 2020-11-30 at 14 11 29

Payment complete screen:

Screen Shot 2020-11-30 at 14 12 06

Payment timeout screen:

Screen Shot 2020-11-30 at 14 11 14

Related information:
Related issue(s): https://omise.atlassian.net/browse/FES-207

2. Description of change

  • Updated includes/gateway/class-omise-payment-paynow.php template page by adding javascript code which sends xhr request to rest api.
  • Updated includes/class-omise-rest-webhooks-controller.php to add new rest api controller.
  • Modified omise-css.css, added new image file

3. Quality assurance

🔧 Environments:

i.e.

  • WooCommerce: v4.3.0
  • WordPress: v5.4.2
  • PHP version: 7.3.3
  • Omise plugin version: Omise-WooCommerce 4.3 (optional, in case of submitting a new issue)

✏️ Details:

  • Added product to cart.
  • Checkout using Paynow QR payment.
  • Observe order success page.

4. Impact of the change

Order success page should be modified after this PR. It should show actual payment status.

5. Priority of change

Normal

6. Additional Notes

None

</div>
<div class="omise-paynow-payment-status">
<div class="pending">
<?php echo __( 'Waiting for payment. Session on this window for payment would timeout in <span id="timer">10:00</span> minutes.', 'omise' ); ?>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "Payment session will time out in..."?

Comment thread includes/gateway/class-omise-payment-paynow.php Outdated
Comment thread includes/gateway/class-omise-payment-paynow.php Outdated
mayurkathale and others added 3 commits November 30, 2020 16:00
Co-authored-by: Daniel Fowler <daniel@omise.co>
Co-authored-by: Daniel Fowler <daniel@omise.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants