@@ -2,13 +2,13 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace App\Http\Controllers; |
| 4 | 4 | |
| 5 | -use Payum\Core\Payum; |
|
| 5 | +use Illuminate\Routing\Controller as BaseController; |
|
| 6 | 6 | use Payum\Core\GatewayInterface; |
| 7 | 7 | use Payum\Core\Model\PaymentInterface; |
| 8 | +use Payum\Core\Payum; |
|
| 8 | 9 | use Payum\Core\Request\GetHumanStatus; |
| 9 | 10 | use Payum\Core\Security\TokenInterface; |
| 10 | 11 | use Payum\Core\Storage\StorageInterface; |
| 11 | -use Illuminate\Routing\Controller as BaseController; |
|
| 12 | 12 | use Recca0120\LaravelPayum\Service\Payum as PayumService; |
| 13 | 13 | |
| 14 | 14 | class PaymentController extends BaseController |
@@ -41,8 +41,7 @@ |
||
| 41 | 41 | * @method __construct |
| 42 | 42 | * |
| 43 | 43 | * @param \Illuminate\Contracts\View\Factory $viewFactory |
| 44 | - * @param \Illuminate\Http\Request $httpRrequest |
|
| 45 | - * @param string $templateName |
|
| 44 | + * @param \Illuminate\Http\Request $request |
|
| 46 | 45 | */ |
| 47 | 46 | public function __construct(ViewFactory $viewFactory, Request $request) |
| 48 | 47 | { |
@@ -3,14 +3,14 @@ |
||
| 3 | 3 | namespace Recca0120\LaravelPayum\Action; |
| 4 | 4 | |
| 5 | 5 | use DateTime; |
| 6 | +use Illuminate\Contracts\View\Factory as ViewFactory; |
|
| 6 | 7 | use Illuminate\Http\Request; |
| 7 | -use Payum\Core\Model\CreditCard; |
|
| 8 | 8 | use Payum\Core\Action\ActionInterface; |
| 9 | -use Payum\Core\Request\ObtainCreditCard; |
|
| 10 | -use Symfony\Component\HttpFoundation\Response; |
|
| 11 | 9 | use Payum\Core\Bridge\Symfony\Reply\HttpResponse; |
| 12 | -use Illuminate\Contracts\View\Factory as ViewFactory; |
|
| 13 | 10 | use Payum\Core\Exception\RequestNotSupportedException; |
| 11 | +use Payum\Core\Model\CreditCard; |
|
| 12 | +use Payum\Core\Request\ObtainCreditCard; |
|
| 13 | +use Symfony\Component\HttpFoundation\Response; |
|
| 14 | 14 | |
| 15 | 15 | class ObtainCreditCardAction implements ActionInterface |
| 16 | 16 | { |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * |
| 10 | 10 | * @method setStatus |
| 11 | 11 | * |
| 12 | - * @param CreditCardInterface $creditCard |
|
| 12 | + * @return void |
|
| 13 | 13 | */ |
| 14 | 14 | public function setStatus($status); |
| 15 | 15 | |
@@ -2,15 +2,15 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Recca0120\LaravelPayum\Extension; |
| 4 | 4 | |
| 5 | -use Payum\Core\Request\Generic; |
|
| 5 | +use Illuminate\Contracts\Events\Dispatcher; |
|
| 6 | 6 | use Payum\Core\Extension\Context; |
| 7 | +use Payum\Core\Extension\ExtensionInterface; |
|
| 7 | 8 | use Payum\Core\Model\PaymentInterface; |
| 9 | +use Payum\Core\Request\Generic; |
|
| 8 | 10 | use Payum\Core\Request\GetHumanStatus; |
| 9 | 11 | use Payum\Core\Request\GetStatusInterface; |
| 10 | -use Illuminate\Contracts\Events\Dispatcher; |
|
| 11 | -use Payum\Core\Extension\ExtensionInterface; |
|
| 12 | -use Recca0120\LaravelPayum\Events\StatusChanged; |
|
| 13 | 12 | use Recca0120\LaravelPayum\Contracts\PaymentStatus; |
| 13 | +use Recca0120\LaravelPayum\Events\StatusChanged; |
|
| 14 | 14 | |
| 15 | 15 | class UpdatePaymentStatusExtension implements ExtensionInterface |
| 16 | 16 | { |
@@ -2,18 +2,18 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Recca0120\LaravelPayum; |
| 4 | 4 | |
| 5 | -use Payum\Core\Payum; |
|
| 6 | -use Illuminate\Support\Arr; |
|
| 7 | -use Payum\Core\PayumBuilder; |
|
| 5 | +use Illuminate\Contracts\View\Factory as ViewFactory; |
|
| 8 | 6 | use Illuminate\Routing\Router; |
| 7 | +use Illuminate\Support\Arr; |
|
| 9 | 8 | use Illuminate\Support\ServiceProvider; |
| 10 | -use Recca0120\LaravelPayum\Service\PayumService; |
|
| 11 | -use Illuminate\Contracts\View\Factory as ViewFactory; |
|
| 9 | +use Payum\Core\Bridge\Symfony\ReplyToSymfonyResponseConverter; |
|
| 10 | +use Payum\Core\Payum; |
|
| 11 | +use Payum\Core\PayumBuilder; |
|
| 12 | 12 | use Recca0120\LaravelPayum\Action\GetHttpRequestAction; |
| 13 | -use Recca0120\LaravelPayum\Action\RenderTemplateAction; |
|
| 14 | 13 | use Recca0120\LaravelPayum\Action\ObtainCreditCardAction; |
| 15 | -use Payum\Core\Bridge\Symfony\ReplyToSymfonyResponseConverter; |
|
| 14 | +use Recca0120\LaravelPayum\Action\RenderTemplateAction; |
|
| 16 | 15 | use Recca0120\LaravelPayum\Extension\UpdatePaymentStatusExtension; |
| 16 | +use Recca0120\LaravelPayum\Service\PayumService; |
|
| 17 | 17 | |
| 18 | 18 | class LaravelPayumServiceProvider extends ServiceProvider |
| 19 | 19 | { |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | * |
| 197 | 197 | * @method getCreditCard |
| 198 | 198 | * |
| 199 | - * @return mixed |
|
| 199 | + * @return CreditCardInterface |
|
| 200 | 200 | */ |
| 201 | 201 | public function getCreditCard() |
| 202 | 202 | { |
@@ -220,7 +220,6 @@ discard block |
||
| 220 | 220 | * |
| 221 | 221 | * @method setStatus |
| 222 | 222 | * |
| 223 | - * @param CreditCardInterface $creditCard |
|
| 224 | 223 | */ |
| 225 | 224 | public function setStatus($status) |
| 226 | 225 | { |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Recca0120\LaravelPayum\Model; |
| 4 | 4 | |
| 5 | -use Payum\Core\Model\PaymentInterface; |
|
| 6 | 5 | use Illuminate\Database\Eloquent\Model; |
| 7 | 6 | use Payum\Core\Model\CreditCardInterface; |
| 7 | +use Payum\Core\Model\PaymentInterface; |
|
| 8 | 8 | use Recca0120\LaravelPayum\Contracts\PaymentStatus; |
| 9 | 9 | |
| 10 | 10 | class Payment extends Model implements PaymentInterface, PaymentStatus |
@@ -2,25 +2,25 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Recca0120\LaravelPayum; |
| 4 | 4 | |
| 5 | +use Illuminate\Contracts\Routing\UrlGenerator; |
|
| 6 | +use Illuminate\Filesystem\Filesystem; |
|
| 5 | 7 | use Illuminate\Support\Arr; |
| 6 | -use Payum\Core\PayumBuilder; |
|
| 7 | -use Payum\Core\Model\ArrayObject; |
|
| 8 | +use Payum\Core\Bridge\Symfony\Security\HttpRequestVerifier; |
|
| 8 | 9 | use Payum\Core\CoreGatewayFactory; |
| 9 | -use Illuminate\Filesystem\Filesystem; |
|
| 10 | 10 | use Payum\Core\GatewayFactoryInterface; |
| 11 | -use Payum\Core\Storage\StorageInterface; |
|
| 11 | +use Payum\Core\Model\ArrayObject; |
|
| 12 | +use Payum\Core\Model\Payment as PayumPayment; |
|
| 13 | +use Payum\Core\Model\Payout as PayumPayout; |
|
| 12 | 14 | use Payum\Core\Model\Token as PayumToken; |
| 15 | +use Payum\Core\PayumBuilder; |
|
| 16 | +use Payum\Core\Registry\StorageRegistryInterface; |
|
| 13 | 17 | use Payum\Core\Storage\FilesystemStorage; |
| 14 | -use Payum\Core\Model\Payout as PayumPayout; |
|
| 15 | -use Payum\Core\Model\Payment as PayumPayment; |
|
| 16 | -use Illuminate\Contracts\Routing\UrlGenerator; |
|
| 18 | +use Payum\Core\Storage\StorageInterface; |
|
| 17 | 19 | use Recca0120\LaravelPayum\Model\GatewayConfig; |
| 18 | -use Payum\Core\Registry\StorageRegistryInterface; |
|
| 20 | +use Recca0120\LaravelPayum\Model\Payment as EloquentPayment; |
|
| 21 | +use Recca0120\LaravelPayum\Model\Token as EloquentToken; |
|
| 19 | 22 | use Recca0120\LaravelPayum\Security\TokenFactory; |
| 20 | 23 | use Recca0120\LaravelPayum\Storage\EloquentStorage; |
| 21 | -use Recca0120\LaravelPayum\Model\Token as EloquentToken; |
|
| 22 | -use Payum\Core\Bridge\Symfony\Security\HttpRequestVerifier; |
|
| 23 | -use Recca0120\LaravelPayum\Model\Payment as EloquentPayment; |
|
| 24 | 24 | |
| 25 | 25 | class PayumBuilderWrapper |
| 26 | 26 | { |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | * @param array $afterParameters |
| 116 | 116 | * @param string $tokenType |
| 117 | 117 | * |
| 118 | - * @return mixed |
|
| 118 | + * @return \Illuminate\Http\RedirectResponse |
|
| 119 | 119 | */ |
| 120 | 120 | public function request($gatewayName, callable $closure, $afterPath = 'payment.done', array $afterParameters = [], $tokenType = 'Capture') |
| 121 | 121 | { |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | * @param array $afterParameters |
| 147 | 147 | * @param string $tokenType |
| 148 | 148 | * |
| 149 | - * @return mixed |
|
| 149 | + * @return \Illuminate\Http\RedirectResponse |
|
| 150 | 150 | */ |
| 151 | 151 | public function prepare($gatewayName, callable $closure, $afterPath = 'payment.done', array $afterParameters = [], $tokenType = 'Capture') |
| 152 | 152 | { |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | * @param string $afterPath |
| 164 | 164 | * @param array $afterParameters |
| 165 | 165 | * |
| 166 | - * @return mixed |
|
| 166 | + * @return \Illuminate\Http\RedirectResponse |
|
| 167 | 167 | */ |
| 168 | 168 | public function capture($gatewayName, callable $closure, $afterPath = 'payment.done', array $afterParameters = []) |
| 169 | 169 | { |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | * @param string $afterPath |
| 181 | 181 | * @param array $afterParameters |
| 182 | 182 | * |
| 183 | - * @return mixed |
|
| 183 | + * @return \Illuminate\Http\RedirectResponse |
|
| 184 | 184 | */ |
| 185 | 185 | public function authorize($gatewayName, callable $closure, $afterPath = 'payment.done', array $afterParameters = []) |
| 186 | 186 | { |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | * @param string $afterPath |
| 198 | 198 | * @param array $afterParameters |
| 199 | 199 | * |
| 200 | - * @return mixed |
|
| 200 | + * @return \Illuminate\Http\RedirectResponse |
|
| 201 | 201 | */ |
| 202 | 202 | public function refund($gatewayName, callable $closure, $afterPath = 'payment.done', array $afterParameters = []) |
| 203 | 203 | { |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | * @param string $afterPath |
| 215 | 215 | * @param array $afterParameters |
| 216 | 216 | * |
| 217 | - * @return mixed |
|
| 217 | + * @return \Illuminate\Http\RedirectResponse |
|
| 218 | 218 | */ |
| 219 | 219 | public function cancel($gatewayName, callable $closure, $afterPath = 'payment.done', array $afterParameters = []) |
| 220 | 220 | { |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | * @param string $afterPath |
| 232 | 232 | * @param array $afterParameters |
| 233 | 233 | * |
| 234 | - * @return mixed |
|
| 234 | + * @return \Illuminate\Http\RedirectResponse |
|
| 235 | 235 | */ |
| 236 | 236 | public function payout($gatewayName, callable $closure, $afterPath = 'payment.done', array $afterParameters = []) |
| 237 | 237 | { |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | * |
| 332 | 332 | * @param string $gatewayName |
| 333 | 333 | * |
| 334 | - * @return mixed |
|
| 334 | + * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response |
|
| 335 | 335 | */ |
| 336 | 336 | public function receiveNotifyUnsafe($gatewayName) |
| 337 | 337 | { |
@@ -493,9 +493,8 @@ discard block |
||
| 493 | 493 | * |
| 494 | 494 | * @method getSessionFromRequest |
| 495 | 495 | * |
| 496 | - * @param \Illuminate\Http\Request $request |
|
| 497 | 496 | * |
| 498 | - * @return \Illuminate\Session\SessionInterface |
|
| 497 | + * @return \Symfony\Component\HttpFoundation\Session\SessionInterface|null |
|
| 499 | 498 | */ |
| 500 | 499 | protected function getSessionFromRequest() |
| 501 | 500 | { |
@@ -2,22 +2,22 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Recca0120\LaravelPayum\Service; |
| 4 | 4 | |
| 5 | -use Payum\Core\Payum; |
|
| 5 | +use Illuminate\Contracts\Routing\ResponseFactory; |
|
| 6 | 6 | use Illuminate\Http\Request; |
| 7 | -use Payum\Core\Request\Sync; |
|
| 7 | +use Payum\Core\Bridge\Symfony\ReplyToSymfonyResponseConverter; |
|
| 8 | +use Payum\Core\Model\Payment as PayumPayment; |
|
| 9 | +use Payum\Core\Payum; |
|
| 10 | +use Payum\Core\Reply\ReplyInterface; |
|
| 11 | +use Payum\Core\Request\Authorize; |
|
| 8 | 12 | use Payum\Core\Request\Cancel; |
| 9 | -use Payum\Core\Request\Notify; |
|
| 10 | -use Payum\Core\Request\Payout; |
|
| 11 | -use Payum\Core\Request\Refund; |
|
| 12 | 13 | use Payum\Core\Request\Capture; |
| 13 | 14 | use Payum\Core\Request\Convert; |
| 14 | -use Payum\Core\Request\Authorize; |
|
| 15 | -use Payum\Core\Reply\ReplyInterface; |
|
| 16 | 15 | use Payum\Core\Request\GetHumanStatus; |
| 17 | -use Payum\Core\Model\Payment as PayumPayment; |
|
| 18 | -use Illuminate\Contracts\Routing\ResponseFactory; |
|
| 16 | +use Payum\Core\Request\Notify; |
|
| 17 | +use Payum\Core\Request\Payout; |
|
| 18 | +use Payum\Core\Request\Refund; |
|
| 19 | +use Payum\Core\Request\Sync; |
|
| 19 | 20 | use Recca0120\LaravelPayum\Model\Payment as EloquentPayment; |
| 20 | -use Payum\Core\Bridge\Symfony\ReplyToSymfonyResponseConverter; |
|
| 21 | 21 | |
| 22 | 22 | class PayumService |
| 23 | 23 | { |