Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ipn info #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ tmp
nbproject
*.swp
spec/dummy
Gemfile.lock
23 changes: 0 additions & 23 deletions app/views/spree/admin/orders/_pp_standard_txns.html.erb

This file was deleted.

28 changes: 28 additions & 0 deletions app/views/spree/admin/payments/source_views/_gateway.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<h2><%= t(:ipn_notifications, :scope => 'paypal') %></h2>

<table class="index">
<tr>
<%- with_options :scope => 'paypal' do |i18n| %>
<th><%= i18n.t(:transaction_type) %></th>
<th><%= i18n.t(:payer_email) %></th>
<th><%= i18n.t(:deposit_amount) %></th>
<th><%= i18n.t(:mc_currency) %></th>
<th><%= i18n.t(:mc_gross) %></th>
<th><%= i18n.t(:mc_fee) %></th>
<th><%= i18n.t(:payment_gross) %></th>
<th><%= i18n.t(:payment_fee) %></th>
<%- end %>
</tr>
<% payment.order.payment_notifications.each do |notification| -%>
<tr>
<td><%= notification.params["txn_type"] or notification.params["reason_code"] %></td>
<td><%= notification.params["payer_email"] %></td>
<td><%= number_to_currency notification.params["payment_gross"].to_f - notification.params["payment_fee"].to_f, :unit => "$" %></td>
<td><%= notification.params["mc_currency"] %></td>
<td><%= notification.params["mc_gross"] %></td>
<td><%= notification.params["mc_fee"] %></td>
<td><%= number_to_currency notification.params["payment_gross"].to_f, :unit => "$" %></td>
<td><%= number_to_currency notification.params["payment_fee"].to_f, :unit => "$" %></td>
</tr>
<% end -%>
</table>
7 changes: 7 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ en:
check_out_with_paypal: "Check out with PayPal"
pp_ws_payment_received: "Thank you.. We received the payment for your order from PayPal. Your order will be shipped shortly"
pp_ws_order_processed_successfully: "Thank you.. Your order processed succesfully. You will be notified once we receive the payment from PayPal"
paypal:
ipn_notifications: IPN Notifications
mc_currency: Payment Currency
mc_gross: Payment Gross (before fees)
mc_fee: Transaction Fee
payment_gross: Payment Gross (USD)
payment_fee: Payment Fee (USD)