New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach PrestaShop order ID to metadata of Omise charge #42

Merged
merged 6 commits into from Nov 13, 2017

Conversation

Projects
None yet
1 participant
@nimid
Contributor

nimid commented Nov 13, 2017

1. Objective

Make it easier to refer to the order of PrestaShop from Omise dashboard by attach PrestaShop order ID to metadata of Omise charge.

Related information:

  • Related issue: -
  • Related ticket: -

2. Description of change

  • Add a function to generate Omise metadata for charge.
  • Attach metadata that contained PrestaShop order ID to the Omise charge both card payment and internet banking payment.

3. Quality assurance

Environments:

  • Platform: PrestaShop 1.7.2.4
  • Omise plugin: Omise PrestaShop 1.3
  • PHP: 5.6.31

Details:

There are 6 test cases.

  1. Success normal card payment.
  2. Failed normal card payment.
  3. Success 3-D Secure payment.
  4. Failed 3-D Secure payment.
  5. Success internet banking payment.
  6. Failed internet banking payment.

All test case expect metadata saved and displayed in Omise dashboard.

  1. Success normal card payment.

The screenshot below shows success charge detail in Omise dashboard. In the red box, order ID of PrestaShop has been saved and displayed as metadata of Omise charge.

omise-dashboard-prestashop-1 7 2 4-charge-detail-metadata-of-card-payment

The screenshot below shows order detail in PrestaShop back office. In the red box, the step of order status has been changed from 1 step to 2 steps, save order as processing and update order status to be success (Payment accepted).

prestashop-order-detail-normal-card-payment-2-steps-of-order-statuses

  1. Failed normal card payment.

The screenshot below shows failed charge detail in Omise dashboard. In the red box, order ID of PrestaShop has been saved and displayed as metadata of Omise charge.

omise-dashboard-prestashop-1 7 2 4-charge-detail-metadata-of-failed-card-payment

The screenshot below shows failed order detail in PrestaShop back office. In the red box, the step of order status has been changed to 2 steps same as the first test case.

prestashop-order-detail-failed-normal-card-payment-2-steps-of-order-statuses

  1. Success 3-D Secure payment.

The screenshot below shows success 3-D Secure charge detail in Omise dashboard. In the red box, order ID of PrestaShop has been saved and displayed as metadata of Omise charge.

omise-dashboard-prestashop-1 7 2 4-charge-detail-metadata-of-3ds-card-payment

  1. Failed 3-D Secure payment.

The screenshot below shows failed 3-D Secure charge detail in Omise dashboard. In the red box, order ID of PrestaShop has been saved and displayed as metadata of Omise charge.

omise-dashboard-prestashop-1 7 2 4-charge-detail-metadata-of-failed-3ds-card-payment

  1. Success internet banking payment.

The screenshot below shows success internet banking charge detail in Omise dashboard. In the red box, order ID of PrestaShop has been saved and displayed as metadata of Omise charge.

omise-dashboard-prestashop-1 7 2 4-charge-detail-metadata-of-internet-banking-payment

  1. Failed internet banking payment.

The screenshot below shows failed internet banking charge detail in Omise dashboard. In the red box, order ID of PrestaShop has been saved and displayed as metadata of Omise charge.

omise-dashboard-prestashop-1 7 2 4-charge-detail-metadata-of-failed-internet-banking-payment

4. Impact of the change

For the normal card payment, the step of payment processing has been changed. It has been changed,

From 1 step of saving an PrestaShop order when Omise charged is success

To 2 steps of saving an PrestaShop order by

  • Save PrestaShop order as processing to use the generated order ID attached it to Omise charge metadata
  • Update PrestaShop order status to be success, if Omise charge is success or update PrestaShop order status to be canceled, if Omise charge is failed.

So, the record of order status has 2 records as mentioned from the above first and second test cases.

5. Priority of change

Normal

6. Additional notes

-

nimid added some commits Nov 11, 2017

Attach order ID to metadata when create IB charge
Attach order ID to metadata when create Omise internet banking charge.
Add order ID to charge metadata for card payment
Append PrestaShop order ID to Omise charge metadata when creating a card
payment (normal card payment and 3DS payment).
Change flow when creating payment by card
This commit affects normal card payment only. 3DS payment is not
affected.

The objective of this commit is to append PrestaShop order ID to the
metadata of Omise charge.

The flow has been changed to save an order as processing at the first
step and uses that generated order ID to append to the metadata of Omise charge.

@nimid nimid merged commit d93257d into support-prestashop-1.7 Nov 13, 2017

@nimid nimid deleted the add-order-id-to-omise-charge branch Nov 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment