Permalink
Browse files

Return url when posting to PayPal

  • Loading branch information...
1 parent b9c01d5 commit 5387862efa30cecb6b7580d43c21641b2ce0ed53 Jacqui Maher and Veez (Matt Remsik) committed with veezus Apr 15, 2009
Showing with 5 additions and 2 deletions.
  1. +1 −0 app/views/myspot/purchases/new.html.haml
  2. +4 −2 spec/views/myspot/purchases/new.html.haml_spec.rb
@@ -51,6 +51,7 @@
Use PayPal to fund a donation with money in your PayPal account, or to pay with a credit card.
.float-right
- form_tag PAYPAL_POST_URL do
+ = hidden_field_tag "return", paypal_return_myspot_purchases_url
= hidden_field_tag "cmd", "_cart"
= hidden_field_tag "upload", "1"
= hidden_field_tag "business", PAYPAL_EMAIL
@@ -6,8 +6,9 @@
template.stub!(:current_user).and_return(@user)
@pitches = [active_pitch, active_pitch]
@donations = @pitches.collect {|pitch| Factory(:donation, :user => @user,
- :pitch => pitch) }
- @spotus_donation = Factory(:spotus_donation, :user => @user, :amount => 1)
+ :pitch => pitch,
+ :purchase => nil) }
+ @spotus_donation = Factory(:spotus_donation, :user => @user, :amount => 1, :purchase => nil)
@purchase = Purchase.new(:user => @user, :donations => @donations,
:spotus_donation => @spotus_donation)
assigns[:donations] = @donations
@@ -22,6 +23,7 @@
with_tag("input[name='cmd'][value=?]", "_cart")
with_tag("input[name='upload'][value=?]", "1")
with_tag("input[name='business'][value=?]", PAYPAL_EMAIL)
+ with_tag("input[name='return'][value=?]", paypal_return_myspot_purchases_url)
end
end
it "includes all donations as line items" do

0 comments on commit 5387862

Please sign in to comment.