public function createPayRequest($data)
    {
        if (empty($data['return_url']) && empty($data['cancel_url'])) {
            throw new \Exception('Return & Cancel URL should be specified');
        }

        $this->setPayRequestDetails($data);

        return $this->doPayPalRequest('Pay');
    }
public function createPayRequest($data)
    {
        if (empty($data['return_url']) && empty($data['cancel_url'])) {
            throw new \Exception('Return & Cancel URL should be specified');
        }

        $this->setPayRequestDetails($data);

        return $this->doPayPalRequest('Pay');
    }
public function createPayRequest ( $ data ) { if ( empty ( $ data [ 'return_url' ] ) && empty ( $ data [ 'cancel_url' ] ) ) { throw new \ Exception ( 'Return & Cancel URL should be specified' ) ; } $ this -> setPayRequestDetails ( $ data ) ; return $ this -> doPayPalRequest ( 'Pay' ) ; }
Function to perform Adaptive Payments API's PAY operation.

@param array $data

@throws \Exception

@return array
Function to perform Adaptive Payments API s PAY operation .