Merge branch 'master' of github.com:spree/spree_paypal_express into custom
Conflicts: app/views/spree/shared/paypal_express_confirm.html.erb
This commit is contained in:
commit
7417b80456
|
@ -0,0 +1,9 @@
|
||||||
|
<% content_for :head do %>
|
||||||
|
<script type="text/javascript">
|
||||||
|
jQuery(document).ready(function(){
|
||||||
|
$("label:contains('<%= payment_method.name %>')").hide();
|
||||||
|
$("label:contains('<%= payment_method.name %>') input").disable();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<% end %>
|
||||||
|
|
|
@ -0,0 +1,110 @@
|
||||||
|
<fieldset>
|
||||||
|
<legend><%= t('paypal_account') %></legend>
|
||||||
|
|
||||||
|
<table class="index">
|
||||||
|
<tr>
|
||||||
|
<th colspan="6"><%= t('account_details') %></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><label><%= t("email") %>:</label></td>
|
||||||
|
<td>
|
||||||
|
<%= payment.source.email %>
|
||||||
|
</td>
|
||||||
|
<td><label><%= t("payer_id") %>:</label></td>
|
||||||
|
<td>
|
||||||
|
<%= payment.source.payer_id %>
|
||||||
|
</td>
|
||||||
|
<td><label><%= t("payer_country") %>:</label></td>
|
||||||
|
<td>
|
||||||
|
<%= payment.source.payer_country %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><label><%= t("payer_status") %>:</label></td>
|
||||||
|
<td colspan="5">
|
||||||
|
<%= payment.source.payer_status %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend><%= t('transactions') %></legend>
|
||||||
|
|
||||||
|
<% payment.log_entries.reverse.each do |log| %>
|
||||||
|
<% details = YAML.load(log.details) rescue "" %>
|
||||||
|
<table class="index">
|
||||||
|
|
||||||
|
<% if details.is_a? ActiveMerchant::Billing::PaypalExpressResponse %>
|
||||||
|
<tr>
|
||||||
|
<th colspan="6"><%= t('transaction') %> <%= details.params["transaction_id"] %> - <%= log.created_at.to_s(:date_time24) %></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="12%;"><label><%= t('type') %>:</label></td>
|
||||||
|
<td width="20%;">
|
||||||
|
<%= details.params["transaction_type"] %>
|
||||||
|
</td>
|
||||||
|
<td width="8%;"><label><%= t("result") %>:</label></td>
|
||||||
|
<td width="20%;">
|
||||||
|
<%= details.message %>
|
||||||
|
</td>
|
||||||
|
<td width="15%;"><label><%= t("amount") %>:</label></td>
|
||||||
|
<td width="20%;">
|
||||||
|
<%= number_to_currency details.params["gross_amount"] %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><label><%= t("comment") %>:</label></td>
|
||||||
|
<td colspan="3">
|
||||||
|
<%= details.params["message"] %>
|
||||||
|
</td>
|
||||||
|
<td><label><%= t("status") %>:</label></td>
|
||||||
|
<td>
|
||||||
|
<%= details.params["payment_status"] %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% if details.params["payment_status"] == "Pending" %>
|
||||||
|
<tr>
|
||||||
|
<td><label><%= t("pending_reason") %>:</label></td>
|
||||||
|
<td colspan="5">
|
||||||
|
<%= details.params["pending_reason"] %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
<% elsif details.is_a? ActiveMerchant::Billing::Integrations::Paypal::Notification %>
|
||||||
|
<tr>
|
||||||
|
<th colspan="6"><%= t('ipn_transaction') %> <%= details.params["txn_id"] %> - <%= log.created_at.to_s(:date_time24) %></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="12%;"><label><%= t('type') %>:</label></td>
|
||||||
|
<td width="20%;">
|
||||||
|
<%= details.params["txn_type"] %>
|
||||||
|
</td>
|
||||||
|
<td width="8%;"><label><%= t("result") %>:</label></td>
|
||||||
|
<td width="20%;">
|
||||||
|
<%= details.params["payment_status"] %>
|
||||||
|
</td>
|
||||||
|
<td width="15%;"><label><%= t("amount") %>:</label></td>
|
||||||
|
<td width="20%;">
|
||||||
|
<%= number_to_currency details.params["mc_gross"] %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><label><%= t("status") %>:</label></td>
|
||||||
|
<td colspan="5">
|
||||||
|
<%= details.params["payment_status"] %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% else %>
|
||||||
|
<tr>
|
||||||
|
<th colspan="6"><%= t('unknown_transaction') %> - <%= log.created_at.to_s(:date_time24) %></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="6"><pre style="overflow: hidden; width:600px;"><%= log.details %></pre></th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
</table>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
</fieldset>
|
|
@ -1,4 +1,4 @@
|
||||||
<%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Payments"} %>
|
<%= render :partial => 'spree/admin/shared/order_tabs', :locals => {:current => "Payments"} %>
|
||||||
|
|
||||||
<% form_tag do %>
|
<% form_tag do %>
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
<%= render :partial => 'spree/shared/order_details', :locals => {:order => @order} -%>
|
<%= render :partial => 'spree/shared/order_details', :locals => {:order => @order} -%>
|
||||||
<hr class="clear"/>
|
<hr class="clear"/>
|
||||||
<div class="form-buttons">
|
<div class="form-buttons">
|
||||||
<%= button_to t(:place_order), paypal_finish_order_checkout_url(@order, {:token => params[:token] , :PayerID => params[:PayerID], :payment_method_id =>
|
<%= button_to t(:place_order), paypal_finish_order_checkout_url(@order, {:token => params[:token] , :PayerID => params[:PayerID], :payment_method_id => params[:payment_method_id] } ), :class => "button primary" %>
|
||||||
params[:payment_method_id] } ), :class => "button primary" %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue