@@ -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 |
@@ -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 | { |
@@ -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 | { |
@@ -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 | { |
@@ -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 | { |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | * receiveAuthorize. |
| 242 | 242 | * |
| 243 | 243 | * @param string $payumToken |
| 244 | - * @return mixed |
|
| 244 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 245 | 245 | */ |
| 246 | 246 | public function receiveAuthorize($payumToken) |
| 247 | 247 | { |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | * receiveCapture. |
| 258 | 258 | * |
| 259 | 259 | * @param string $payumToken |
| 260 | - * @return mixed |
|
| 260 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 261 | 261 | */ |
| 262 | 262 | public function receiveCapture($payumToken = null) |
| 263 | 263 | { |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | * receiveNotify. |
| 274 | 274 | * |
| 275 | 275 | * @param string $payumToken |
| 276 | - * @return mixed |
|
| 276 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 277 | 277 | */ |
| 278 | 278 | public function receiveNotify($payumToken) |
| 279 | 279 | { |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | * receiveNotifyUnsafe. |
| 289 | 289 | * |
| 290 | 290 | * @param string $gatewayName |
| 291 | - * @return mixed |
|
| 291 | + * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response |
|
| 292 | 292 | */ |
| 293 | 293 | public function receiveNotifyUnsafe($gatewayName) |
| 294 | 294 | { |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | * receivePayout. |
| 307 | 307 | * |
| 308 | 308 | * @param string $payumToken |
| 309 | - * @return mixed |
|
| 309 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 310 | 310 | */ |
| 311 | 311 | public function receivePayout($payumToken) |
| 312 | 312 | { |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | * receiveCancel. |
| 323 | 323 | * |
| 324 | 324 | * @param string $payumToken |
| 325 | - * @return mixed |
|
| 325 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 326 | 326 | */ |
| 327 | 327 | public function receiveCancel($payumToken) |
| 328 | 328 | { |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | * receiveRefund. |
| 343 | 343 | * |
| 344 | 344 | * @param string $payumToken |
| 345 | - * @return mixed |
|
| 345 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 346 | 346 | */ |
| 347 | 347 | public function receiveRefund($payumToken) |
| 348 | 348 | { |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | * receiveSync. |
| 363 | 363 | * |
| 364 | 364 | * @param string $payumToken |
| 365 | - * @return mixed |
|
| 365 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 366 | 366 | */ |
| 367 | 367 | public function receiveSync($payumToken) |
| 368 | 368 | { |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | * |
| 380 | 380 | * @param string $payumToken |
| 381 | 381 | * @param callable $closure |
| 382 | - * @return mixed |
|
| 382 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 383 | 383 | */ |
| 384 | 384 | public function receiveDone($payumToken, callable $closure) |
| 385 | 385 | { |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | * |
| 392 | 392 | * @param string $payumToken |
| 393 | 393 | * @param callable $closure |
| 394 | - * @return mixed |
|
| 394 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 395 | 395 | */ |
| 396 | 396 | public function done($payumToken, callable $closure) |
| 397 | 397 | { |
@@ -428,7 +428,6 @@ discard block |
||
| 428 | 428 | /** |
| 429 | 429 | * getSessionFromRequest. |
| 430 | 430 | * |
| 431 | - * @param \Illuminate\Http\Request $request |
|
| 432 | 431 | * @return \Symfony\Component\HttpFoundation\Session\SessionInterface|null |
| 433 | 432 | */ |
| 434 | 433 | protected function getSessionFromRequest() |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | /** |
| 25 | 25 | * __construct. |
| 26 | 26 | * |
| 27 | - * @param \Payum\Core\Model\GetStatusInterface $status |
|
| 27 | + * @param GetStatusInterface $status |
|
| 28 | 28 | * @param \Payum\Core\Model\PaymentInterface $payment |
| 29 | 29 | */ |
| 30 | 30 | public function __construct(GetStatusInterface $status, PaymentInterface $payment) |