我使用信用卡已经设置了payum Paypal Rest. Credit card purchase到我的支付laravel应用,可谓万事俱备,但它给了我的异常,如:Laravel payum和PayPal休息
的模型Payum \宝\休息\存储Model \ PaymentDetails不是 注册。有以下型号的存储: 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();
.
.
.
,我需要为模型Payum\Paypal\Rest\Model\PaymentDetails
注册存储?