Issue/167 test mode always set to true#168
Merged
RichardWatkins1 merged 16 commits intomasterfrom Feb 5, 2019
Merged
Conversation
RichardWatkins1
commented
Feb 5, 2019
|
|
||
| # DEFAULT value for test mode is true. | ||
| def test_mode | ||
| FlexCommerceApi.config.order_test_mode || true |
Contributor
Author
There was a problem hiding this comment.
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.
iankduffy
approved these changes
Feb 5, 2019
praweb
approved these changes
Feb 5, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#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_modewe 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.