Skip to content

Releases: shiftcommerce/flex-ruby-gem

Support sending X-Forwarded-For header

Choose a tag to compare

@paulspringett paulspringett released this 04 Mar 10:58

Configure a lambda to set to a X-Forwarded-For header on outgoing requests:

FlexCommerceApi.config do |config|
  config.forwarded_for = ->{ RequestStore[:request_ip] }
end

In a Rails app you might set this as follows:

# application_controller.rb
class ApplicationController
  before_action :set_request_ip

  private

  def set_request_ip
    RequestStore[:request_ip] = request.remote_ip
  end
end

Paypal Authentication migration to gem

Choose a tag to compare

@praweb praweb released this 16 Apr 10:00
0b858fe

#165 - This PR handles first part of shiftcommerce/matalan-rails-site#2388 (comment)

We have migrated the auth and order creation process to the gem. We also have introduced retries around the paypal process, as we know the Paypal Auth process is most time taking one, and the possibility of timeouts around it is more.

Updated test_mode conditional so value can be boolean or string

Choose a tag to compare

@RichardWatkins1 RichardWatkins1 released this 03 Apr 12:01
0bc8126

Update the below method:

def test_mode
  FlexCommerceApi.config.order_test_mode == true || FlexCommerceApi.config.order_test_mode == "true"
end

Revert Json Api Client Upgrade

Choose a tag to compare

@praweb praweb released this 08 Mar 09:23
d5f0ff8

#170 - This PR reverts the json api client upgrade introduced in #158 this upgrade has introduced serious performance issues on FE

Bugfix - Correct test_mode method to return TEST_ORDER_MODE boolean correctly

Choose a tag to compare

@RichardWatkins1 RichardWatkins1 released this 05 Feb 15:39
49feac5

Updated the test mode method so it correctly returns if it should be a test order or not depending on the environment.

def test_mode 
  FlexCommerceApi.config.order_test_mode == true 
end

Update cart create method so initial line items created along side the cart in development mode.

Choose a tag to compare

@RichardWatkins1 RichardWatkins1 released this 12 Nov 16:13
573701a

In order to identify 'test' orders if we are running in development mode we were previously overwriting the attributes with {test: true}. This release updates the cart models create so {test: true} is merged into the attributes rather than overwriting them.

Upgrade json_api_client to v1.5.3

Choose a tag to compare

@adamdullenty adamdullenty released this 05 Oct 09:32
292304f

This PR upgrades json_api_client to v1.5.3.

Note that changes are required on the F/E in order to work with this version of the gem (info will be added to F/E gem update ticket)

Improve error messages when json parsing fails

Choose a tag to compare

@hubertpompecki hubertpompecki released this 03 Oct 10:44
e64a65e
Improve error messages thrown when json parsing fails (#154)

* Improve error messages thrown when json parsing fails

* Use raven_context instead of the error message

* Add Sentry context to internal server errors

Update the Paypal Test Mode condition

Choose a tag to compare

@praweb praweb released this 13 Sep 10:47
45344ee

#159: Instead of checking if it is true or not. Check whether it is being set or not.

Migrate Paypal setup to FE

Choose a tag to compare

@praweb praweb released this 09 Aug 13:42
3cde200

We now have the Paypal setup and Additional Info functionalities migrated to FE. Final Payment processing like authorizations etc, will be still handled at platform level.