Skip to content

Issue/167 test mode always set to true#168

Merged
RichardWatkins1 merged 16 commits intomasterfrom
issue/167_test_mode_always_set_to_true
Feb 5, 2019
Merged

Issue/167 test mode always set to true#168
RichardWatkins1 merged 16 commits intomasterfrom
issue/167_test_mode_always_set_to_true

Conversation

@RichardWatkins1
Copy link
Copy Markdown
Contributor

@RichardWatkins1 RichardWatkins1 commented Feb 5, 2019

#167

The issue

Test mode was always being set to true, this caused an error on live as basing on the result of the call to test_mode we decide which paypal endpoint to use.

The fix

Revert the change so that the correct boolean will be returned.

QA

Using create a branch on matalan-rails-site which uses this branch:

gem "flex_commerce_api", git: "https://github.com/shiftcommerce/flex-ruby-gem.git", branch: "issue/167_test_mode_always_set_to_true"

deploy this branch to the live staging environment,

using the live staging url add an item to your basket and continue through checkout,

on the final step of checkout click the paypal button and you should be redirected to a paypal page,

DO NOT COMPLETE THE ORDER as this is a live url the order will actually be placed and you will be charged.

The front end branch release/1.75.5 contains this change and has been deployed to the staging url.

@RichardWatkins1 RichardWatkins1 self-assigned this Feb 5, 2019

# DEFAULT value for test mode is true.
def test_mode
FlexCommerceApi.config.order_test_mode || true
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Previously this line would always return true as in production FlexCommerceApi.config.order_test_mode is set to false which then defaults to use true.

@RichardWatkins1 RichardWatkins1 merged commit 49feac5 into master Feb 5, 2019
@RichardWatkins1 RichardWatkins1 deleted the issue/167_test_mode_always_set_to_true branch February 5, 2019 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants