Parameter Encryption Method Explanation
Use HashKey and HasIV for AES encryption. Please UrlEncode the payload before AES encryption.
- AES encryption strength setting mode: 128 bit.
- CipherMode: CBC
- PaddingMode: PKCS7
Special Note:
- Please do not use the test information in the production environment because it may not interface correctly.
- When switching to the production environment (real/live mode), please replace them with real ones that you apply to ECPay.Please refer to Get production environment information.
Encryption Example
- MerchantID=3085676
- HashKey=7b53896b742849d3
- HashIV=37a0ad3c6ffa428b
(1) Data before encryption:
{"Name":"Test","ID":"A123456789"}
(2) URL Encode
%7B%22Name%22%3A%22Test%22%2C%22ID%22%3A%22A123456789%22%7D
(3) AES encryption:
oxmUqzelA4koGRQ+myZggW5qNqlVdytGJadngOuWA7jd1Fakpay72J/w5IXLIINqCYcmx7gLsaednuH54LjffA==
Decryption Example
- MerchantID=3085676
- HashKey=7b53896b742849d3
- HashIV=37a0ad3c6ffa428b
(1) Data (AES encrypted):
oxmUqzelA4koGRQ+myZggW5qNqlVdytGJadngOuWA7jd1Fakpay72J/w5IXLIINqCYcmx7gLsaednuH54LjffA==
(2) After decryption:
%7B%22Name%22%3A%22Test%22%2C%22ID%22%3A%22A123456789%22%7D
(3) URLDecode:
{"Name":"Test","ID":"A123456789"}