简体   繁体   中英

Error Code: 21002 currency: Required parameter missing (CCAvenue) using codeigniter

I have installed the plugin and set it up successfully, but when I tried to pay with this, it's showing error:

"Error Code: 21002 Invalid Currency Parameter."

After code review I came to know that query string, the currency parameter getting changed to " ¤cy=INR " as " ¤ " is getting executed as html special character.

This is query getting...

merchant_id=123456789&order_id=xxxxxxxx&amount=1.00¤cy=INR&language=EN&billing_name=gfgh ghfhgfgh&billing_address=abc&billing_city=abc

As per the html entities, ¤ belongs to ¤, when you use &currency in the URL, it automatically gets converted to ¤cy. Even last semicolon (;) is not there in the &curren, it still creates ¤ html entity. Solution to this problem is

  1. to either use urlencode urlencode(merchant_id=123456789&order_id=xxxxxxxx&amount=1.00&currency=INR&language=EN&billing_name=gfghghfhgfgh&billing_address=abc&billing_city=abc) or
  2. to use html entity for & character like amount=1.00&currency=INR

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM