Skip to content

Commit

Permalink
PayU India: Increase allowed txnid to 30 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
ntalbott committed Jul 14, 2015
1 parent e8caf28 commit 13cfb33
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
Expand Up @@ -13,7 +13,7 @@
* Stripe: Make purchase via vaulted card consistent [duff]
* Moneris: Add network tokenization support [andrewpaliga]
* Ogone: Allow specifying a timeout value for requests [tomhipkin]

* PayU India: Increase allowed txnid to 30 characters [ntalbott]

== Version 1.51.0 (July 2, 2015)

Expand Down
2 changes: 1 addition & 1 deletion lib/active_merchant/billing/gateways/payu_in.rb
Expand Up @@ -124,7 +124,7 @@ def add_addresses(post, options)
def add_invoice(post, money, options)
post[:amount] = amount(money)

post[:txnid] = clean(options[:order_id], :alphanumeric, 25)
post[:txnid] = clean(options[:order_id], :alphanumeric, 30)
post[:productinfo] = clean(options[:description] || "Purchase", nil, 100)

post[:surl] = "http://example.com"
Expand Down
4 changes: 2 additions & 2 deletions test/unit/gateways/payu_in_test.rb
Expand Up @@ -181,7 +181,7 @@ def test_input_constraint_cleanup
month: "4",
year: "2015"
),
order_id: ("!@#" + ("a" * 26)),
order_id: ("!@#" + ("a" * 31)),
description: ("a" * 101),
email: ("c" * 51),
billing_address: {
Expand All @@ -208,7 +208,7 @@ def test_input_constraint_cleanup
end.check_request do |endpoint, data, headers|
case endpoint
when /_payment/
assert_parameter("txnid", /^a/, data, length: 25)
assert_parameter("txnid", /^a/, data, length: 30)
assert_parameter("productinfo", /^a/, data, length: 100)
assert_parameter("firstname", /^a/, data, length: 60)
assert_parameter("lastname", /^a/, data, length: 20)
Expand Down

0 comments on commit 13cfb33

Please sign in to comment.