@@ -2,10 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Goodoneuz\PayUz\Database\Seeds; |
| 4 | 4 | |
| 5 | -use Illuminate\Database\Seeder; |
|
| 6 | -use Illuminate\Support\Facades\Schema; |
|
| 7 | 5 | use Goodoneuz\PayUz\Models\PaymentSystem; |
| 8 | 6 | use Goodoneuz\PayUz\Models\PaymentSystemParam; |
| 7 | +use Illuminate\Database\Seeder; |
|
| 8 | +use Illuminate\Support\Facades\Schema; |
|
| 9 | 9 | |
| 10 | 10 | class PayUzSeeder extends Seeder |
| 11 | 11 | { |
@@ -146,6 +146,9 @@ discard block |
||
| 146 | 146 | $this->response->setResult(Response::SUCCESS,$additional_params); |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | + /** |
|
| 150 | + * @param string[] $fields |
|
| 151 | + */ |
|
| 149 | 152 | private function check_for_required_field($fields) |
| 150 | 153 | { |
| 151 | 154 | $arr = $this->request->all(); |
@@ -162,6 +165,9 @@ discard block |
||
| 162 | 165 | return true; |
| 163 | 166 | } |
| 164 | 167 | |
| 168 | + /** |
|
| 169 | + * @param integer $currency |
|
| 170 | + */ |
|
| 165 | 171 | public function getRedirectParams($model, $amount, $currency, $url) |
| 166 | 172 | { |
| 167 | 173 | $time = date('Y-m-d H:i:s', time()); |
@@ -1,12 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Goodoneuz\PayUz\Http\Classes\Click; |
| 3 | 3 | |
| 4 | -use Goodoneuz\PayUz\Models\Transaction; |
|
| 4 | +use Goodoneuz\PayUz\Http\Classes\BaseGateway; |
|
| 5 | +use Goodoneuz\PayUz\Http\Classes\DataFormat; |
|
| 5 | 6 | use Goodoneuz\PayUz\Models\PaymentSystem; |
| 7 | +use Goodoneuz\PayUz\Models\Transaction; |
|
| 6 | 8 | use Goodoneuz\PayUz\Services\PaymentService; |
| 7 | -use Goodoneuz\PayUz\Http\Classes\DataFormat; |
|
| 8 | -use Goodoneuz\PayUz\Http\Classes\BaseGateway; |
|
| 9 | -use Goodoneuz\PayUz\Http\Classes\PaymentException; |
|
| 10 | 9 | use Goodoneuz\PayUz\Services\PaymentSystemService; |
| 11 | 10 | |
| 12 | 11 | class Click extends BaseGateway |
@@ -11,6 +11,9 @@ |
||
| 11 | 11 | private $response; |
| 12 | 12 | |
| 13 | 13 | |
| 14 | + /** |
|
| 15 | + * @param Response $response |
|
| 16 | + */ |
|
| 14 | 17 | public function __construct($response) |
| 15 | 18 | { |
| 16 | 19 | $this->config = PaymentSystemService::getPaymentSystemParamsCollect(PaymentSystem::CLICK); |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace Goodoneuz\PayUz\Http\Classes\Click; |
| 4 | 4 | |
| 5 | 5 | use Goodoneuz\PayUz\Models\PaymentSystem; |
| 6 | -use Goodoneuz\PayUz\Http\Classes\PaymentException; |
|
| 7 | 6 | use Goodoneuz\PayUz\Services\PaymentSystemService; |
| 8 | 7 | |
| 9 | 8 | class Merchant{ |
@@ -427,6 +427,10 @@ |
||
| 427 | 427 | return $result; |
| 428 | 428 | |
| 429 | 429 | } |
| 430 | + |
|
| 431 | + /** |
|
| 432 | + * @param integer $currency |
|
| 433 | + */ |
|
| 430 | 434 | public function getRedirectParams($model, $amount, $currency, $url){ |
| 431 | 435 | return [ |
| 432 | 436 | 'merchant' => $this->config['merchant_id'], |
@@ -1,13 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Goodoneuz\PayUz\Http\Classes\Payme; |
| 3 | 3 | |
| 4 | -use Goodoneuz\PayUz\Models\Transaction; |
|
| 5 | -use Goodoneuz\PayUz\Models\PaymentSystem; |
|
| 6 | -use Goodoneuz\PayUz\Services\PaymentService; |
|
| 7 | 4 | use Goodoneuz\PayUz\Http\Classes\DataFormat; |
| 8 | -use Goodoneuz\PayUz\Http\Classes\BaseGateway; |
|
| 9 | -use Goodoneuz\PayUz\Models\PaymentSystemParam; |
|
| 10 | 5 | use Goodoneuz\PayUz\Http\Classes\PaymentException; |
| 6 | +use Goodoneuz\PayUz\Models\PaymentSystem; |
|
| 7 | +use Goodoneuz\PayUz\Models\PaymentSystemParam; |
|
| 8 | +use Goodoneuz\PayUz\Models\Transaction; |
|
| 9 | +use Goodoneuz\PayUz\Services\PaymentService; |
|
| 11 | 10 | use Goodoneuz\PayUz\Services\PaymentSystemService; |
| 12 | 11 | |
| 13 | 12 | class Payme { |
@@ -23,6 +23,7 @@ |
||
| 23 | 23 | /** |
| 24 | 24 | * Request constructor. |
| 25 | 25 | * Parses request payload and populates properties with values. |
| 26 | + * @param Response $response |
|
| 26 | 27 | */ |
| 27 | 28 | public function __construct($response) |
| 28 | 29 | { |
@@ -9,8 +9,8 @@ |
||
| 9 | 9 | namespace Goodoneuz\PayUz\Http\Controllers; |
| 10 | 10 | |
| 11 | 11 | |
| 12 | -use Illuminate\Http\Request; |
|
| 13 | 12 | use App\Http\Controllers\Controller; |
| 13 | +use Illuminate\Http\Request; |
|
| 14 | 14 | |
| 15 | 15 | class ApiController extends Controller |
| 16 | 16 | { |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | * Store a newly created resource in storage. |
| 44 | 44 | * |
| 45 | 45 | * @param \Illuminate\Http\Request $request |
| 46 | - * @return \Illuminate\Http\Response |
|
| 46 | + * @return \Illuminate\Http\RedirectResponse |
|
| 47 | 47 | */ |
| 48 | 48 | public function store(Request $request) |
| 49 | 49 | { |
@@ -9,12 +9,12 @@ |
||
| 9 | 9 | namespace Goodoneuz\PayUz\Http\Controllers; |
| 10 | 10 | |
| 11 | 11 | |
| 12 | -use Illuminate\Http\Request; |
|
| 13 | 12 | use App\Http\Controllers\Controller; |
| 14 | -use Illuminate\Support\Facades\Validator; |
|
| 15 | 13 | use Goodoneuz\PayUz\Models\PaymentSystem; |
| 16 | 14 | use Goodoneuz\PayUz\Models\PaymentSystemParam; |
| 17 | 15 | use Goodoneuz\PayUz\Services\PaymentSystemService; |
| 16 | +use Illuminate\Http\Request; |
|
| 17 | +use Illuminate\Support\Facades\Validator; |
|
| 18 | 18 | |
| 19 | 19 | class PaymentSystemController extends Controller |
| 20 | 20 | { |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Goodoneuz\PayUz\Models; |
| 4 | 4 | |
| 5 | -use Illuminate\Database\Eloquent\Model; |
|
| 6 | 5 | use Goodoneuz\PayUz\Http\Classes\DataFormat; |
| 6 | +use Illuminate\Database\Eloquent\Model; |
|
| 7 | 7 | use Illuminate\Database\Eloquent\SoftDeletes; |
| 8 | 8 | |
| 9 | 9 | class Transaction extends Model |
@@ -2,14 +2,13 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Goodoneuz\PayUz; |
| 4 | 4 | |
| 5 | -use Illuminate\Support\Facades\View; |
|
| 6 | -use Goodoneuz\PayUz\Models\Transaction; |
|
| 7 | -use Goodoneuz\PayUz\Models\PaymentSystem; |
|
| 8 | -use Goodoneuz\PayUz\Http\Classes\Payme\Payme; |
|
| 9 | 5 | use Goodoneuz\PayUz\Http\Classes\Click\Click; |
| 6 | +use Goodoneuz\PayUz\Http\Classes\Payme\Payme; |
|
| 7 | +use Goodoneuz\PayUz\Http\Classes\PaymentException; |
|
| 10 | 8 | use Goodoneuz\PayUz\Http\Classes\Paynet\Paynet; |
| 11 | 9 | use Goodoneuz\PayUz\Http\Classes\Stripe\Stripe; |
| 12 | -use Goodoneuz\PayUz\Http\Classes\PaymentException; |
|
| 10 | +use Goodoneuz\PayUz\Models\PaymentSystem; |
|
| 11 | +use Goodoneuz\PayUz\Models\Transaction; |
|
| 13 | 12 | |
| 14 | 13 | class PayUz |
| 15 | 14 | { |