Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function genTopupUrl($amount)
- {
- $amountk = $amount * 100;
- $order_id = 'adsdasdassda'; //some uuid FIXME
- $back_url = "http://2pro-trener.ru/index.php?page=compleat&orderNumber=" + $order_id;
- // PAYMENTGATE_URL
- // init guzzle
- $requester = new Client([
- 'headers' => [
- 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*;q=0.8',
- 'Accept-Language: ru,en-us;q=0.7,en;q=0.3',
- 'Accept-Encoding: deflate',
- 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7'
- ]
- ]);
- $res = $requester->request(
- 'POST',
- "https://3dsec.paymentgate.ru/ipay/rest/register.do?userName=".Constants::PAYMENTGATE_MERCHANT_USER."&password=".Constants::PAYMENTGATE_MERCHANT_PASSWORD."&language=ru&amount=".$amountk."&returnUrl=".$back_url,
- ['json' => [
- 'jsonParams' => [
- "email" => '13',
- "phone" => '132',
- "contact" => '24234'
- ]
- ]
- ]
- );
- return $resJson = $res->getBody()->getContents();;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement