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

Simplify payment gateway configuration #16

Closed
oxipay opened this issue Feb 27, 2017 · 5 comments
Closed

Simplify payment gateway configuration #16

oxipay opened this issue Feb 27, 2017 · 5 comments
Assignees

Comments

@oxipay
Copy link
Owner

oxipay commented Feb 27, 2017

Issue
Merchants are incorrectly assuming that setting the test mode flag will toggle the production and sandbox payment gateway URLs.

Current state
Among other things, we currently capture the following details as part of Oxipay plugin configuration:

  • Production payment gateway URL.
  • Sandbox payment gateway URL
  • Test mode

The system will always use the production payment gateway URL if and when it is assigned. The system will only use the sandbox URL if the production URL is not set. Merchants could also force the plugin to use the sandbox URL by explicitly assigned this value to the production payment gateway URL. Requests to both the production & sandbox payment gateway URLs can specify a test mode flag. This flags the transaction on the Oxipay side as a test transaction such that no credit-card deposit will be processed and no direct-debits will be set up.

Target state
We would like a single payment gateway URL and a test mode flag. If the merchant wants to point their website at the production payment gateway they’d configure the payment gateway URL to be a production URL. If they want to point their website at an integration/sandbox URL, they’d configure the payment gateway URL to be a sandbox URL. We would like to keep the test mode flag, because a) our request API is based on Shopify, which has a test flag, and b) we use this flag to decide whether to do a credit-card deposit (note: sandbox environment is pointing at TEST bank APIs) and initial setup of the direct debits.

@sam-flexi
Copy link
Collaborator

sam-flexi commented Mar 8, 2017

There is now a single payment Gateway URL which is correct. However, Oxipay documentation states that x_test is a boolean that is either false or true. However when inspecting the payload I can see that when Test Mode is Yes, x_test is set to 1 and when it is set to No x_test doesn't have any value (presumably null).

Test Mode: Yes (x_test=1)
x_reference=7&x_account_id=30199250&x_amount=1020&x_currency=USD&x_url_callback=https%3A%2F%2F10.130.24.164%2Foxipay%2Fcheckout%2Fsaveorder%2FquoteId%2F7%2F&x_url_complete=https%3A%2F%2F10.130.24.164%2Foxipay%2Fcheckout%2Fsuccess%2FquoteId%2F7%2F&x_url_cancel=https%3A%2F%2F10.130.24.164%2Fcheckout%2F&x_test=1&x_shop_country=AU&x_shop_name=Default+Store+View&x_customer_first_name=&x_customer_last_name=&x_customer_email=&x_customer_phone=0407229128&x_customer_billing_country=AU&x_customer_billing_city=Adelaide&x_customer_billing_address1=97+Pirie+St&x_customer_billing_address2=&x_customer_billing_state=ACT&x_customer_billing_zip=5095&x_customer_shipping_country=AU&x_customer_shipping_city=Adelaide&x_customer_shipping_address1=97+Pirie+St&x_customer_shipping_address2=&x_customer_shipping_state=&x_customer_shipping_zip=5095&x_signature=83af49ec98f382f8e6290e4c4e1bfbb5fce41d7498d29b252f655f5b26246637

Test Mode: No (x_test=)
x_reference=7&x_account_id=30199250&x_amount=1020&x_currency=USD&x_url_callback=https%3A%2F%2F10.130.24.164%2Foxipay%2Fcheckout%2Fsaveorder%2FquoteId%2F7%2F&x_url_complete=https%3A%2F%2F10.130.24.164%2Foxipay%2Fcheckout%2Fsuccess%2FquoteId%2F7%2F&x_url_cancel=https%3A%2F%2F10.130.24.164%2Fcheckout%2F&x_test=1&x_shop_country=AU&x_shop_name=Default+Store+View&x_customer_first_name=&x_customer_last_name=&x_customer_email=&x_customer_phone=0407229128&x_customer_billing_country=AU&x_customer_billing_city=Adelaide&x_customer_billing_address1=97+Pirie+St&x_customer_billing_address2=&x_customer_billing_state=ACT&x_customer_billing_zip=5095&x_customer_shipping_country=AU&x_customer_shipping_city=Adelaide&x_customer_shipping_address1=97+Pirie+St&x_customer_shipping_address2=&x_customer_shipping_state=&x_customer_shipping_zip=5095&x_signature=83af49ec98f382f8e6290e4c4e1bfbb5fce41d7498d29b252f655f5b26246637

Are you able to resolve this so that it is a boolean which is either true or false and not 1 (integer) or null.

Also inspected the Developer Tools and the same was observed there as well:
Test Mode: Yes
image

Test Mode: No
image

iugo-josh added a commit that referenced this issue Mar 8, 2017
@iugo-josh
Copy link
Contributor

I've pushed another commit to PR #21 to address the test parameter. It now sends 'true' or 'false'.

@sam-flexi
Copy link
Collaborator

sam-flexi commented Mar 20, 2017

I have clarified this with Ryan and basically we would like :

1 - The x_test key to be hardcoded to 'false'; and

2 - The Test Mode UI be removed from the UI.

Josh, are we able to make this change thanks; moving the issue back to the backlog.

iugo-josh added a commit that referenced this issue Mar 22, 2017
@iugo-josh
Copy link
Contributor

I have pushed a commit to PR #21 to address this feedback.

@sam-flexi
Copy link
Collaborator

This is now resolved and Oxidocs has been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants