Skip to content
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

Payment: OnePay International gateway #74

Closed
12 tasks done
htdat opened this issue Aug 29, 2020 · 4 comments · Fixed by #75
Closed
12 tasks done

Payment: OnePay International gateway #74

htdat opened this issue Aug 29, 2020 · 4 comments · Fixed by #75
Assignees
Labels
feature Pri - High High priority issues.

Comments

@htdat
Copy link
Owner

htdat commented Aug 29, 2020

Docs: https://mtf.onepay.vn/developer/?page=modul_quocte

Diff between Domestic and International:

  • Error codes and messages
  • payment and queryDR links
Links Domestic Int'l:
Pay - test https://mtf.onepay.vn/onecomm-pay/vpc.op https://mtf.onepay.vn/vpcpay/vpcpay.op
Pay - production https://onepay.vn/onecomm-pay/vpc.op https://onepay.vn/vpcpay/vpcpay.op
queryDR - test https://mtf.onepay.vn/onecomm-pay/Vpcdps.op https://mtf.onepay.vn/vpcpay/Vpcdps.op
queryDR - production https://onepay.vn/onecomm-pay/Vpcdps.op https://onepay.vn/vpcpay/Vpcdps.op
  • AgainLink value is required in Int'l - while this is not required in Domestic. May apply for both? Yes, apply for both (tested)

  • Different logo images

  • Different messages in $order_note

Plan to work on this

  • Solution 1: Build an abstraction or parent class for both gateways.
  • Solution 2: build two separated classes.

Working branch: https://github.com/htdat/woo-viet/commits/add/onepay-intl

Check-list

  • Handle the related option in the main file woo-viet.php
  • Handle the compatibility for handle_onepay_ipn. It should be good. No need to change anything.
  • Handle the compatibility for handle_onepay_querydr
  • Check the case Woo Viet is just active
  • Check the case Woo Viet is upgradred

Improvements

  • Fixed this error:

[01-Sep-2020 16:36:41 UTC] PHP Deprecated: WC_Order::cancel_order is deprecated since version 3.0! Use WC_Order::update_status instead. in /app/public/wp-includes/functions.php on line 4773

Possible Improvements

  • Checked: vpc_Currency supports both VND and USD, or only VND? If both, it's a good idea to support for stores with the default currency = USD too. Result: tried to use USD but that does not help. However, I asked one of my friends directly. His company can charge foreign customers in USD directly. I guess this needs some kinds of arrangements between merchants and OnePay.

=> Moving this improvement idea to #76

@htdat htdat changed the title Gateway: OnePay International Payment: OnePay International gateway Aug 29, 2020
@htdat htdat self-assigned this Aug 29, 2020
@daohoangson
Copy link
Contributor

Thank you for working on all these new issues 👍

@htdat
Copy link
Owner Author

htdat commented Sep 2, 2020

@daohoangson - would you be interested in testing this new gateway?

I've run some manual tests and the result looks positive.

Testing steps:

  1. Remove Woo-Viet plugin if it currently exists.
  2. Download this dev version (1.5.0-dev) https://github.com/htdat/woo-viet/archive/master.zip
  3. Manually install it.
  4. In WP Admin > WooCommerce > Settings > Payments, the new gateway will be displayed.
  5. Configure it and try making payments with it.

Thanks in advance!

@daohoangson
Copy link
Contributor

I think I can test this later today. Will report back when it's done.

@htdat htdat reopened this Sep 4, 2020
@htdat
Copy link
Owner Author

htdat commented Sep 4, 2020

Thank you. If so, please use the master branch. I've updated the testing steps above.
https://github.com/htdat/woo-viet/archive/master.zip

@htdat htdat closed this as completed Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Pri - High High priority issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants