<% 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" %>
<%= t 'label.loading' %>
<% end -%>