lib/rsr_group/order.rb in rsr_group-1.7.6 vs lib/rsr_group/order.rb in rsr_group-1.7.7
- old
+ new
@@ -16,10 +16,10 @@
def initialize(options = {})
requires!(options, :merchant_number, :sequence_number, :username, :password, :identifier)
@credentials = options.select { |k, v| [:username, :password].include?(k) }
@identifier = options[:identifier]
- @merchant_number = options[:merchant_number]
+ @merchant_number = "%05d" % options[:merchant_number] # Leading zeros are required
@sequence_number = "%04d" % options[:sequence_number] # Leading zeros are required
@timestamp = Time.now.strftime("%Y%m%d")
@items = []
end