/** * @test */ public function createBillingAgrement() { //@testo:start //@testo:source //@testo:uncomment:use Payum\Core\Request\CaptureRequest; //@testo:uncomment:use Payum\Paypal\ExpressCheckout\Nvp\Api; $captureBillingAgreement = new CaptureRequest(array('PAYMENTREQUEST_0_AMT' => 0, 'RETURNURL' => 'http://foo.com/finishPayment', 'CANCELURL' => 'http://foo.com/finishPayment', 'L_BILLINGTYPE0' => Api::BILLINGTYPE_RECURRING_PAYMENTS, 'L_BILLINGAGREEMENTDESCRIPTION0' => 'Subsribe for weather forecast')); // ... //@testo:end $billingAgreementDetails = $captureBillingAgreement->getModel(); $billingAgreementDetails['TOKEN'] = 'aToken'; $billingAgreementDetails['EMAIL'] = '*****@*****.**'; $captureBillingAgreement->setModel($billingAgreementDetails); return $captureBillingAgreement; }