I have online payment form. On-click I should pass following information to online payment company.
- Mid--->Merchant ID
- Amount--->Transaction amount (Integer: $50.25 = 5025)
- Currency--->Transaction currency code (ISO 4217)
- Description--->Transaction description (Can be used for item assignment)
- Reference--->Transaction reference (unique transaction value set by merchant)
- Language--->Language{az/en/ru)
- Signature--->MD5 hash of concatenated parameter length + value with secret key
Signature example:
$signature = Strtoupper(md5(strlen($mid).$mid.strlen($amount).$amount.strlen($currency).$currency.(!empty($description)? strlen($description).$description :"0").strlen($reference).$reference.strlen($language).$language.$key));
The resulting URL should be like this:
https://test.millikart.az:7444/gateway/payment/register?mid=Test&amount=5025¤cy=944&description=test1000&reference=T7D3EDB885A5BC3C&language=az&signature=9A9E510BE7094D94284F1AFFE00FA4DA
The amount of information that should be sent to an online payment company is a JavaScript variable that I get as a result of JavaScript calculations. I couldn't figure out how to achieve it. Any kind of help is appreciated. Thanks