YandexMoney\ExternalPayment::request PHP Method

request() public method

Requests an external payment.
See also: http://api.yandex.com/money/doc/dg/reference/request-external-payment.xml
See also: https://tech.yandex.ru/money/doc/dg/reference/request-external-payment-docpage/
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);
    }

Usage Example

Example #1
0
 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);
     }
 }
All Usage Examples Of YandexMoney\ExternalPayment::request