Sha256: 79b5eaeefbaac105b17fb93ca4b665c846d0d629f48985bc3582513d6224cfab

Contents?: true

Size: 1.43 KB

Versions: 2

Compression:

Stored size: 1.43 KB

Contents

<% payment_service_for @payment.id, Settings.paypal_account,
      service: :paypal,
      amount: @payment.amount,
      currency: 'USD',
      html: {enctype: "application/x-www-form-urlencoded",
                id: "payment-form", class: "order_form"} do |service| %>

  <% if account_signed_in? %>
    <% profile = current_account.profile %>
    <% service.customer first_name: profile.name,
      phone: current_account.full_phone,
      email: profile.email %>
  <% end %>

  <% paypal_additional_data_hash.each_with_index do |(key,value),index| %>
    <%= hidden_field_tag "on#{index}", key %>
    <%= hidden_field_tag "os#{index}", value %>
  <% end %>

  <% service.invoice @payment.id %>
  <% service.amount @payment.amount %>
  <% service.item_name @payment.item_name %>
  <% service.words_count @payment.order.total_words_count %>
  <% service.quantity 1 %>
  <% service.business Settings.paypal_account %>

  <% service.currency_code "USD" %>
  <% service.tax '0.00' %>
  <% service.cmd "_xclick" %>

  <% service.cancel_return_url payments_integrations_fail_url(provider: :paypal, token: @payment.public_token) %>
  <% service.return_url payments_integrations_success_url(provider: :paypal, order_id: @payment.order.number) %>

  <%= service.submit_tag "Pay" %>

  <div class="send_preloader">
    <%= t 'label.loading' %>
  </div>
<% end -%>

<script type="text/javascript">
  window.onload = function(){
    document.forms[0].submit();
  };
</script>

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
translation_cms-0.1.5 app/views/payments/integrations/providers/credit_card.html.erb
translation_cms-0.1.5 app/views/payments/integrations/providers/paypal.html.erb