<?php
$secret = '5d41402abc4b2a76b9719d911017c592';
$baseUrl = 'http://mg.s.stuffio.com/api/widget/init?';
$params = [
'amount' => 5000,
'currency' => 'VND',
'country' => 'VN',
'merchant_id' => 2,
'uid' => 'test',
];
ksort($params);
$stringToSign = implode('|', $params) . $secret;
$params['signature'] = strtolower(md5($stringToSign));
echo $baseUrl . http_build_query($params);
- Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
- http://mg.s.stuffio.com/api/widget/init?amount=5000&country=VN¤cy=VND&merchant_id=2&uid=test&signature=07e30cd0e153ed60eac13a9e08c2228f
preferences:
224.96 ms | 403 KiB | 287 Q