$content = trim(file_get_contents("php://input"));
$data = json_decode($content,true);
$payment = $client->createPayment(
array(
'amount' => array(
'value' => $data->price,
'currency' => 'RUB'
),
'confirmation' => array(
'type' => 'redirect',
'return_url' => 'site.ru',
),
'capture' => true,
'description' => '№' . 1,
'metadata' => array(
'order_number' => 1
)
),
uniqid('', true)
$content = trim(file_get_contents("php://input"));
$data = json_decode($content,true);
$client = new Client();
//
$client = new Client();
$client->setAuth('', '');
$payment = $client->createPayment(
array(
'amount' => array(
'value' => $data->price,
'currency' => 'RUB'
),
'confirmation' => array(
'type' => 'redirect',
'return_url' => 'https://site.ru',
),
'capture' => true,
'description' => ' №' . $data->number_order,
'metadata' => array(
'order_number' => 1
)
),
uniqid('', true)
);
$link = $payment->_confirmation->_confirmationUrl;