Skip to content

Commit

Permalink
Creating a no_shipping preference to give the store developer a say i…
Browse files Browse the repository at this point in the history
…n whether to send the shipping address.

In reference to spree-contrib#113
  • Loading branch information
fredjean committed Oct 1, 2014
1 parent 517a926 commit 361a31e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/spree/paypal_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def express_checkout_request_details order, items
:SolutionType => payment_method.preferred_solution.present? ? payment_method.preferred_solution : "Mark",
:LandingPage => payment_method.preferred_landing_page.present? ? payment_method.preferred_landing_page : "Billing",
:cppheaderimage => payment_method.preferred_logourl.present? ? payment_method.preferred_logourl : "",
:NoShipping => 1,
:NoShipping => payment_method.preferred_no_shipping.present? ? (payment_method.preferred_no_shipping ? 1 : 0) : 1,
:PaymentDetails => [payment_details(items)]
}}
end
Expand Down
1 change: 1 addition & 0 deletions app/models/spree/gateway/pay_pal_express.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class Gateway::PayPalExpress < Gateway
preference :solution, :string, default: 'Mark'
preference :landing_page, :string, default: 'Billing'
preference :logourl, :string, default: ''
preference :no_shipping, :boolean, default: true

def supports?(source)
true
Expand Down

0 comments on commit 361a31e

Please sign in to comment.