I want to integrate paytm using ruby on rails for web only, now the problem is that when I fetched the values of attributes form database like MID, CUST_ID, WEBSITE, CALLBACK_URL, INDUSTRY_TYPE_ID and some others attributes, then one problem is occurring which is below.
Attributes:
paramList["WEBSITE"] = "WEBSTAGING"
Error:
invalid: Special character not allowed
def start_payment
unless @paytm_keys.nil?
paramList = Hash.new
paramList["MID"] = ""
paramList["ORDER_ID"] = "#{Time.now.to_i.to_s}"
paramList["CUST_ID"] = "#{Time.now.to_i.to_s}"
paramList["INDUSTRY_TYPE_ID"] = @paytm_keys.industry_type_id
paramList["CHANNEL_ID"] = @paytm_keys.channel_id
paramList["TXN_AMOUNT"] = @payable_amount
paramList["MOBILE_NO"] = @paytm_keys.mobile_number
paramList["EMAIL"] = @paytm_keys.email
paramList["WEBSITE"] = "WEBSTAGING"
paramList["CALLBACK_URL"] = @paytm_keys.paytm_url
@paramList=paramList
puts @paramList
@checksum_hash = generate_checksum()
respond_to do |format|
format.js
format.html
end
else
redirect_to new_checkout_path, alert: "Right now you don't have to pay."
end
end