Set flash[:commerce_tracking] on success, and string HTML tags from product name and description sent to PayPal. [Fixes #85 #76]

This commit is contained in:
Jeff Dutil 2012-11-19 07:41:13 -05:00
parent 4725846db0
commit 50684bbb1d
1 changed files with 3 additions and 3 deletions

View File

@ -173,8 +173,8 @@ module Spree
@order.finalize!
flash[:notice] = I18n.t(:order_processed_successfully)
flash[:commerce_tracking] = "true"
redirect_to completion_route
else
payment.failure!
order_params = {}
@ -269,8 +269,8 @@ module Spree
def order_opts(order, payment_method_id, stage)
items = order.line_items.map do |item|
price = (item.price * 100).to_i # convert for gateway
{ :name => item.variant.product.name,
:description => (item.variant.product.description[0..120] if item.variant.product.description),
{ :name => item.variant.product.name.gsub(/<\/?[^>]*>/, ""),
:description => (item.variant.product.description[0..120].gsub(/<\/?[^>]*>/, "") if item.variant.product.description),
:number => item.variant.sku,
:quantity => item.quantity,
:amount => price,