getPaymentSystemId(); if($paymentIds[0]==3){ $client = new Client(); // $client->setAuth('625629', 'test_X7Rb98RA65SZA2Q7B6TyKYpMDPAtMU0BAuXV4QckVuQ'); $client->setAuth('625311', 'live_9QzwBgCJBmuan1SdM5bGRSqG6BQONVzGlbCIMjcvDYc'); // live_9QzwBgCJBmuan1SdM5bGRSqG6BQONVzGlbCIMjcvDYc $idempotenceKey = uniqid('', true); $payment = $client->createPayment( array( 'amount' => array( 'value' => $order->getPrice(), 'currency' => 'RUB', ), 'payment_method_data' => array( 'type' => 'bank_card', ), 'confirmation' => array( 'type' => 'redirect', 'return_url' => 'https://ttepla.com/', ), 'metadata' => array ( "order_id" => $order->getId() ), 'description' => 'Заказ №' . $order->getId() ), $idempotenceKey ); echo $payment->confirmation->confirmation_url; }elseif($paymentIds[0]==2){ echo "https://ttepla.com/oplata/pay.php?ORDER_ID=".$_REQUEST['order_id']."&pdf=1&DOWNLOAD=Y"; }