Guest User

Untitled

a guest
Jul 20th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. <!-- app/views/payment/new.html.erb -->
  2.  
  3. <% payment_service_for @order.id, PAYPAL_ACCOUNT,
  4. :amount => @order.price, :currency => 'EUR',
  5. :service => :paypal do |service|
  6.  
  7. service.customer :first_name => current_user.name,
  8. :last_name => current_user.surname,
  9. :email => current_user.email
  10.  
  11. service.item_name @order.items_summary
  12.  
  13. # PayPal will POST a callback here when the payment is done
  14. service.notify_url notifications_url(@order)
  15. # PayPal will take your user here with a POST after he pays
  16. service.return_url paypal_return_notifications_url(@order)
  17. # PayPal will redirect your user here if he cancels the payment
  18. service.cancel_return_url paypal_cancel_notifications_url(@order) %>
  19.  
  20. <%= submit_tag 'Pay this order' %>
  21. <% end %>
Add Comment
Please, Sign In to add comment