Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

sanitize merchantware order id

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

0 comments on commit 2dc4fb2

Please sign in to comment.
Something went wrong with that request. Please try again.