Closed karlimlengco closed 10 years ago
the lib itself support it. you can adopt this example to laravel http://payum.org/doc/0.10/PaypalExpressCheckoutNvp/recurring-payments-basics
Thanks
hi, what this error means? Resolving timed out after 5514 milliseconds
something failed due timeout, dont know any special details
can internet connection may cause it?
hi again. i recieved ack: success but in paypal payment is not save, did i missed something? this is my create code, thanks
<?php
$request = \App::make('request');
$request->attributes->set('payum_token', Input::get('payum_token'));
$token = $this->getHttpRequestVerifier()->verify($request);
$payment = $this->getPayum()->getPayment($token->getPaymentName());
$agreementStatus = new SimpleStatusRequest($token);
$payment->execute($agreementStatus);
$recurringPaymentStatus = null;
if (false == $agreementStatus->isSuccess()) {
header('HTTP/1.1 400 Bad Request', true, 400);
exit;
}
$agreementDetails = $agreementStatus->getModel();
$storage = $this->getPayum()->getStorage('Scribe\Models\Frontend\RecurringPaymentDetails');
$recurringPaymentDetails = $storage->createModel();
$recurringPaymentDetails['TOKEN'] = $agreementDetails['TOKEN'];
$recurringPaymentDetails['DESC'] = $agreementDetails['L_BILLINGAGREEMENTDESCRIPTION0'];
$recurringPaymentDetails['EMAIL'] = $agreementDetails['EMAIL'];
$recurringPaymentDetails['AMT'] = $agreementDetails['AMT'];
$recurringPaymentDetails['CURRENCYCODE'] = 'USD';
$recurringPaymentDetails['BILLINGFREQUENCY'] = 30;
$recurringPaymentDetails['PROFILESTARTDATE'] = date(DATE_ATOM);
$recurringPaymentDetails['BILLINGPERIOD'] = Api::BILLINGPERIOD_DAY;
$payment->execute(new CreateRecurringPaymentProfileRequest($recurringPaymentDetails));
$payment->execute(new SyncRequest($recurringPaymentDetails));
$doneToken = \App::make('payum.security.token_factory')->createToken('paypal_es', $recurringPaymentDetails, 'http://localhost:8000/recurring/done');
return \Redirect::to($doneToken->getTargetUrl());
Config?
This is my whole config
<?php
use Buzz\Client\Curl;
use Payum\Core\Storage\FilesystemStorage;
use Payum\Paypal\ExpressCheckout\Nvp\Api;
use Payum\Paypal\ExpressCheckout\Nvp\PaymentFactory as PaypalPaymentFactory;
$detailsClass = 'Payum\Core\Model\ArrayObject';
$agreement = 'Scribe\Models\Frontend\AgreementDetails';
$recurring = 'Scribe\Models\Frontend\RecurringPaymentDetails';
$tokenClass = 'Payum\Core\Model\Token';
$paypalPayment = PaypalPaymentFactory::create(new Api(new Curl, array(
'username' => 'xxxx',
'password' => 'xxxx',
'signature' => 'xxxx',
'sandbox' => true
)));
return array(
'token_storage' => new FilesystemStorage(__DIR__.'/../../../../storage/payments', $tokenClass, 'hash'),
'payments' => array(
'paypal_es' => $paypalPayment,
),
'storages' => array(
$detailsClass => new FilesystemStorage(__DIR__.'/../../../../storage/payments', $detailsClass),
$agreement => new FilesystemStorage(__DIR__.'/../../../../storage/payments', $agreement),
$recurring => new FilesystemStorage(__DIR__.'/../../../../storage/payments', $recurring),
)
);
@karlimlengco first, could you try to comment out storage for $detailsClass
.
i got it working, but in paypal it create two payment 1. Payment form = Completed, 2. Recurring Payment form = Created. is this correct?
Iiam getting this error what can i do for this error.but code is same as here. Method [getHttpRequestVerifier] does not exist.
Is this support Recurring method in paypal?