title: Implement Payum/Laravel recurring payment
body: <p>I have some issues trying to get this working, I've implemented the checkout express (or seems to be) successfully, but also my system needs subscription option, following this <a href="http://payum.org/doc/0.13/PaypalExpressCheckoutNvp/recurring-payments-basics" rel="noreferrer">example</a>.</p>
  
  <p>Now, my problem is that in Laravel you cannot simply put some random files, so I'm trying to do it in the correct way, sadly, there is no documentation of the classes and methods including on the library.</p>
  
  <p>I've created some functions within controllers (I don't know if this the right way) the problem I'm facing now is trying to createRecurringPayment() to apply the desired amount of the recurring payment, is the final step I guess.</p>
  
  <p>Thanks for yout help.</p>
  
  <ul>
  <li><p>app/controllers/PaypalController.php</p>
  
  <pre><code>public function prepareExpressCheckout(){
      $storage = $this-&gt;getPayum()-&gt;getStorage('Payum\Core\Model\ArrayObject');
      $details = $storage-&gt;createModel();
      $details['PAYMENTREQUEST_0_CURRENCYCODE'] = 'USD';
      $details['PAYMENTREQUEST_0_AMT'] = 1.23;
      $storage-&gt;updateModel($details);
      $captureToken = $this-&gt;getTokenFactory()-&gt;createCaptureToken('paypal_es', $details, 'payment_done');
      $details['RETURNURL'] = $captureToken-&gt;getTargetUrl();
      $details['CANCELURL'] = $captureToken-&gt;getTargetUrl();
      $storage-&gt;updateModel($details);
      return \Redirect::to($captureToken-&gt;getTargetUrl());
  }
  
  public function prepareSubscribe(){
      $storage = $this-&gt;getPayum()-&gt;getStorage('Payum\Core\Model\ArrayObject');
      $details = $storage-&gt;createModel();
  
      $details['PAYMENTREQUEST_0_AMT'] = 0;
      $details['L_BILLINGTYPE0'] = Api::BILLINGTYPE_RECURRING_PAYMENTS;
      $details['L_BILLINGAGREEMENTDESCRIPTION0'] = "Suscripción por X meses";
      $details['NOSHIPPING'] = 1;
  
      $storage-&gt;updateModel($details);
      $captureToken = $this-&gt;getTokenFactory()-&gt;createCaptureToken('paypal_es', $details, 'payment_done');
      $storage-&gt;updateModel($details);
  
      return \Redirect::to($captureToken-&gt;getTargetUrl());
  }
  
  public function createRecurringPayment(){
      $payum_token = Input::get('payum_token');
      $request = \App::make('request');
      $request-&gt;attributes-&gt;set('payum_token', $payum_token);
      $token = ($request);
      //$this-&gt;invalidate($token);
  
      $agreementStatus = new GetHumanStatus($token);
      $payment-&gt;execute($agreementStatus);
  
      if (!$agreementStatus-&gt;isSuccess()) {
          header('HTTP/1.1 400 Bad Request', true, 400);
          exit;
      }
  
      $agreementDetails = $agreementStatus-&gt;getModel();
  
      $storage = $this-&gt;getPayum()-&gt;getStorage('Payum\Core\Model\ArrayObject');
  
      $recurringPaymentDetails = $storage-&gt;createModel();
      $recurringPaymentDetails['TOKEN'] = $agreementDetails['TOKEN'];
      $recurringPaymentDetails['DESC'] = 'Subscribe to weather forecast for a week. It is 0.05$ per day.';
      $recurringPaymentDetails['EMAIL'] = $agreementDetails['EMAIL'];
      $recurringPaymentDetails['AMT'] = 0.05;
      $recurringPaymentDetails['CURRENCYCODE'] = 'USD';
      $recurringPaymentDetails['BILLINGFREQUENCY'] = 7;
      $recurringPaymentDetails['PROFILESTARTDATE'] = date(DATE_ATOM);
      $recurringPaymentDetails['BILLINGPERIOD'] = Api::BILLINGPERIOD_DAY;
  
      $payment-&gt;execute(new CreateRecurringPaymentProfile($recurringPaymentDetails));
      $payment-&gt;execute(new Sync($recurringPaymentDetails));
  
      $doneToken = $this-&gt;createToken('paypal_es', $recurringPaymentDetails, 'payment_done');
  
      return \Redirect::to($doneToken-&gt;getTargetUrl());
  }
  </code></pre></li>
  <li><p>app/routes.php</p>
  
  <pre><code>    Route::get('/payment', array('as' =&gt; 'payment', 'uses' =&gt; 'PaymentController@payment'));
      Route::get('/payment/done', array('as' =&gt; 'payment_done', 'uses' =&gt; 'PaymentController@done'));
      Route::get('/payment/paypal/express-checkout/prepare', array('as' =&gt; 'paypal_es_prepare', 'uses' =&gt; 'PaypalController@prepareExpressCheckout'));
      Route::get('/payment/paypal/subscribe/prepare', array('as' =&gt; 'paypal_re_prepare', 'uses' =&gt; 'PaypalController@prepareSubscribe'));
      Route::get('/payment/paypal/subscribe/create', array('as' =&gt; 'payment_create', 'uses' =&gt; 'PaypalController@createRecurringPayment'));
  </code></pre></li>
  </ul>