Skip to content

Commit

Permalink
Add invoice number to the SetExpressCheckout payload
Browse files Browse the repository at this point in the history
  • Loading branch information
stuart committed Dec 17, 2012
1 parent 89a7ff4 commit 698b367
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions lib/paypal/express/request.rb
Expand Up @@ -14,11 +14,12 @@ def setup(payment_requests, return_url, cancel_url, options = {})
params[:NOSHIPPING] = 1
end
{
:solution_type => :SOLUTIONTYPE,
:landing_page => :LANDINGPAGE,
:email => :EMAIL,
:brand => :BRANDNAME,
:locale => :LOCALECODE
:solution_type => :SOLUTIONTYPE,
:landing_page => :LANDINGPAGE,
:email => :EMAIL,
:brand => :BRANDNAME,
:locale => :LOCALECODE,
:invoice_number => :INVNUM
}.each do |option_key, param_key|
params[param_key] = options[option_key] if options[option_key]
end
Expand Down
3 changes: 2 additions & 1 deletion spec/paypal/express/request_spec.rb
Expand Up @@ -131,7 +131,8 @@ def post_with_logging(method, params)
:landing_page => :LANDINGPAGE,
:email => :EMAIL,
:brand => :BRANDNAME,
:locale => :LOCALECODE
:locale => :LOCALECODE,
:invoice_number => :INVNUM
}.each do |option_key, param_key|
it "should support #{option_key} option" do
expect do
Expand Down

0 comments on commit 698b367

Please sign in to comment.