Permalink
Browse files

sanitize merchantware order id

  • Loading branch information...
Cody Fauser
Cody Fauser committed Oct 7, 2009
1 parent d05c089 commit 2dc4fb2f72ecbe200bcb9783ce333a20b6219910
Showing with 2 additions and 1 deletion.
  1. +1 −0 CHANGELOG
  2. +1 −1 lib/active_merchant/billing/gateways/merchant_ware.rb
View
@@ -1,5 +1,6 @@
= ActiveMerchant CHANGELOG
+* Strip non alpha numeric chars out of MerchantWare order number [cody]
* Parse complete response of Authorize.net CIM gateway [Patrick Joyce]
* Update to PayPal Sandbox URL for testing Payflow Pro Express Checkout. See Express Checkout for Payflow Pro guide [cody]
* Provide a C_STATE value of "Outside United States" for SageGateway when processing international customers [cody]
@@ -179,7 +179,7 @@ def expdate(credit_card)
end
def add_invoice(xml, options)
- xml.tag! "strOrderNumber", options[:order_id].to_s.slice(0, 25)
+ xml.tag! "strOrderNumber", options[:order_id].to_s.gsub(/[^\w]/, '').slice(0, 25)
end
def add_amount(xml, money, tag = "strAmount")

0 comments on commit 2dc4fb2

Please sign in to comment.