Sha256: e4bbf56cd122ccc1694011b4f53992ce0e755bb64ebfec9c5a33a24968f4a142

Contents?: true

Size: 1.48 KB

Versions: 19

Compression:

Stored size: 1.48 KB

Contents

- paypal_account = MySettings.ecommerce_live ? Forge.config.ecommerce.paypal_production[:account] : Forge.config.ecommerce.paypal_sandbox[:account]
= form_tag ActiveMerchant::Billing::Integrations::Paypal.service_url do
  = hidden_field_tag "business", paypal_account

  = hidden_field_tag "cancel_return", "http://" + request.host + "/orders/cancel"
  = hidden_field_tag "notify_url", "http://" + request.host + "/hosted_payment/notify"
  = hidden_field_tag "return", "http://" + request.host + paid_order_path(@cart_order, :key => @cart_order.key)

  = hidden_field_tag "redirect_cmd", "_xclick"
  = hidden_field_tag "cmd", "_cart"
  = hidden_field_tag "upload", 1

  = hidden_field_tag "charset", "utf-8"

  = hidden_field_tag "currency_code", Forge.config.ecommerce.currency
  = hidden_field_tag "invoice", invoice_number_for_paypal(order)
  = hidden_field_tag "tax_cart", order.tax
  - if MySettings.use_coupons
    = hidden_field_tag "discount_amount_cart", order.discount
  = hidden_field_tag "item_name", "Order #{invoice_number_for_paypal(order)}"
  = hidden_field_tag "handling_cart", order.shipping_and_handling

  - i = 1
  - order.line_items.each do |item|
    = hidden_field_tag "item_name_#{i}", item.product.title
    = hidden_field_tag "amount_#{i}", item.price
    = hidden_field_tag "quantity_#{i}", item.quantity
    = hidden_field_tag "tax_#{i}", 0
    - i += 1

  = hidden_field_tag "no_note", 0
  = hidden_field_tag "no_shipping", 2

  = submit_tag 'Pay With Paypal', :class => "order-button"

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
forge-cli-0.1.10 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.1.9 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.1.8 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.1.7 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.1.6 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.1.5 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.1.4 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.1.3 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.1.2 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.1.1 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.1.0 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.0.18 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.0.17 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.0.16 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.0.15 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.0.14 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.0.13 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.0.12 lib/forge/app/views/hosted_payment/_paypal.html.haml
forge-cli-0.0.11 lib/forge/app/views/hosted_payment/_paypal.html.haml