public request ( array[] $payment_options ) : response | ||
$payment_options | array[] | Key-value parameters collection |
return | response | object |
public function request($payment_options)
{
$payment_options['instance_id'] = $this->instance_id;
return self::sendRequest("/api/request-external-payment", $payment_options);
}
private function getRequestId(ExternalPayment $external_payment) { $payment_options = array('pattern_id' => 'p2p', 'to' => $this->params['wallet'], 'amount' => $this->params['price'], 'message' => 'Подписка на газету FLStory'); $response = $external_payment->request($payment_options); if ($response->status === 'success') { $this->request_id = $response->request_id; } else { throw new \Exception($response->message); } }