@@ -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 | { |
@@ -39,8 +39,7 @@ |
||
| 39 | 39 | * __construct. |
| 40 | 40 | * |
| 41 | 41 | * @param \Illuminate\Contracts\View\Factory $viewFactory |
| 42 | - * @param \Illuminate\Http\Request $httpRrequest |
|
| 43 | - * @param string $templateName |
|
| 42 | + * @param \Illuminate\Http\Request $request |
|
| 44 | 43 | */ |
| 45 | 44 | public function __construct(ViewFactory $viewFactory, Request $request) |
| 46 | 45 | { |
@@ -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 |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | /** |
| 167 | 167 | * getCreditCard. |
| 168 | 168 | * |
| 169 | - * @return mixed |
|
| 169 | + * @return CreditCardInterface |
|
| 170 | 170 | */ |
| 171 | 171 | public function getCreditCard() |
| 172 | 172 | { |
@@ -186,7 +186,6 @@ discard block |
||
| 186 | 186 | /** |
| 187 | 187 | * setStatus. |
| 188 | 188 | * |
| 189 | - * @param CreditCardInterface $creditCard |
|
| 190 | 189 | */ |
| 191 | 190 | public function setStatus($status) |
| 192 | 191 | { |
@@ -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 | { |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * @param string $afterPath |
| 106 | 106 | * @param array $afterParameters |
| 107 | 107 | * @param string $tokenType |
| 108 | - * @return mixed |
|
| 108 | + * @return \Illuminate\Http\RedirectResponse |
|
| 109 | 109 | */ |
| 110 | 110 | public function request($gatewayName, callable $closure, $afterPath = 'payment.done', array $afterParameters = [], $tokenType = 'Capture') |
| 111 | 111 | { |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | * @param string $afterPath |
| 134 | 134 | * @param array $afterParameters |
| 135 | 135 | * @param string $tokenType |
| 136 | - * @return mixed |
|
| 136 | + * @return \Illuminate\Http\RedirectResponse |
|
| 137 | 137 | */ |
| 138 | 138 | public function prepare($gatewayName, callable $closure, $afterPath = 'payment.done', array $afterParameters = [], $tokenType = 'Capture') |
| 139 | 139 | { |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | * @param callable $closure |
| 148 | 148 | * @param string $afterPath |
| 149 | 149 | * @param array $afterParameters |
| 150 | - * @return mixed |
|
| 150 | + * @return \Illuminate\Http\RedirectResponse |
|
| 151 | 151 | */ |
| 152 | 152 | public function capture($gatewayName, callable $closure, $afterPath = 'payment.done', array $afterParameters = []) |
| 153 | 153 | { |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | * @param callable $closure |
| 162 | 162 | * @param string $afterPath |
| 163 | 163 | * @param array $afterParameters |
| 164 | - * @return mixed |
|
| 164 | + * @return \Illuminate\Http\RedirectResponse |
|
| 165 | 165 | */ |
| 166 | 166 | public function authorize($gatewayName, callable $closure, $afterPath = 'payment.done', array $afterParameters = []) |
| 167 | 167 | { |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | * @param callable $closure |
| 176 | 176 | * @param string $afterPath |
| 177 | 177 | * @param array $afterParameters |
| 178 | - * @return mixed |
|
| 178 | + * @return \Illuminate\Http\RedirectResponse |
|
| 179 | 179 | */ |
| 180 | 180 | public function refund($gatewayName, callable $closure, $afterPath = 'payment.done', array $afterParameters = []) |
| 181 | 181 | { |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | * @param callable $closure |
| 190 | 190 | * @param string $afterPath |
| 191 | 191 | * @param array $afterParameters |
| 192 | - * @return mixed |
|
| 192 | + * @return \Illuminate\Http\RedirectResponse |
|
| 193 | 193 | */ |
| 194 | 194 | public function cancel($gatewayName, callable $closure, $afterPath = 'payment.done', array $afterParameters = []) |
| 195 | 195 | { |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | * @param callable $closure |
| 204 | 204 | * @param string $afterPath |
| 205 | 205 | * @param array $afterParameters |
| 206 | - * @return mixed |
|
| 206 | + * @return \Illuminate\Http\RedirectResponse |
|
| 207 | 207 | */ |
| 208 | 208 | public function payout($gatewayName, callable $closure, $afterPath = 'payment.done', array $afterParameters = []) |
| 209 | 209 | { |
@@ -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 | { |
@@ -428,8 +428,7 @@ discard block |
||
| 428 | 428 | /** |
| 429 | 429 | * getSessionFromRequest. |
| 430 | 430 | * |
| 431 | - * @param \Illuminate\Http\Request $request |
|
| 432 | - * @return \Illuminate\Session\SessionInterface |
|
| 431 | + * @return \Symfony\Component\HttpFoundation\Session\SessionInterface|null |
|
| 433 | 432 | */ |
| 434 | 433 | protected function getSessionFromRequest() |
| 435 | 434 | { |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | /** |
| 25 | 25 | * __construct. |
| 26 | 26 | * |
| 27 | - * @param \Payum\Core\Model\PaymentInterface $status |
|
| 27 | + * @param GetStatusInterface $status |
|
| 28 | 28 | * @param \Payum\Core\Model\PaymentInterface $payment |
| 29 | 29 | */ |
| 30 | 30 | public function __construct(GetStatusInterface $status, PaymentInterface $payment) |