mirror of
https://github.com/apigy/selfstarter.git
synced 2026-01-08 22:07:56 -05:00
added code so that port will be used if you are not in production mode so that you can test amazon flexible payments end to end in development
This commit is contained in:
@@ -26,11 +26,13 @@ class PreorderController < ApplicationController
|
||||
# From there, we save it, and voila, we got ourselves a preorder!
|
||||
@pipeline = AmazonFlexPay.multi_use_pipeline(@order.uuid,
|
||||
:transaction_amount => price,
|
||||
:global_amount_limit => Settings.charge_limit,
|
||||
:global_amount_limit => price + Settings.charge_limit,
|
||||
:collect_shipping_address => "True",
|
||||
:payment_reason => Settings.payment_description)
|
||||
|
||||
redirect_to @pipeline.url("#{request.scheme}://#{request.host}/preorder/postfill")
|
||||
|
||||
port = Rails.env.production? ? "" : ":3000"
|
||||
redirect_to @pipeline.url("#{request.scheme}://#{request.host}#{port}/preorder/postfill")
|
||||
end
|
||||
|
||||
def postfill
|
||||
|
||||
Reference in New Issue
Block a user