I have setup the payum Paypal Rest. Credit card purchase into my laravel app for payment using credit card, everything is set but it's given me exception like:
A storage for model Payum\Paypal\Rest\Model\PaymentDetails was not registered. There are storages for next models: Payum\Core\Model\Payment, Payum\Core\Model\ArrayObject, Payum\Core\Model\Payout.
AppServiceProvider.php
//For payment gateway...
$this->app->resolving('payum.builder', function(\Payum\Core\PayumBuilder $payumBuilder) {
$payumBuilder
// this method registers filesystem storages, consider to change them to something more
// sophisticated, like eloquent storage
->addDefaultStorages()
//->getPayum();
->addGateway('paypal_ec', [
'factory' => 'paypal_express_checkout',
'username' => config('payment.paypalusername'),
'password' => config('payment.paypalpassword'),
'signature' => config('payment.paypalsignature'),
'sandbox' => true
])
->addGateway('paypalRest', [
'factory' => 'paypal_rest',
'client_id' => config('payment.paypalclientid'),
'client_secret' => config('payment.paypalsecret'),
'config_path' => '%kernel.root_dir%/config/sdk_config.ini'
]);
});
prepare.php
$storage = $this->getPayum()->getStorage('Payum\Paypal\Rest\Model\PaymentDetails');
$payment = $storage->create();
.
.
.
Where I need to register storage for model Payum\Paypal\Rest\Model\PaymentDetails
?