@@ -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); |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Goodoneuz\PayUz\Http\Classes\Click; |
| 4 | 4 | |
| 5 | -use Goodoneuz\PayUz\Http\Classes\PaymentException; |
|
| 6 | 5 | use Goodoneuz\PayUz\Models\PaymentSystem; |
| 7 | 6 | use Goodoneuz\PayUz\Services\PaymentSystemService; |
| 8 | 7 | |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Goodoneuz\PayUz\Http\Classes\PaymentException; |
| 6 | 6 | use Goodoneuz\PayUz\Models\PaymentSystem; |
| 7 | -use Goodoneuz\PayUz\Services\PaymentService; |
|
| 8 | 7 | use Goodoneuz\PayUz\Services\PaymentSystemService; |
| 9 | 8 | |
| 10 | 9 | class Response{ |
@@ -2,14 +2,14 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace App\Http\Controllers; |
| 4 | 4 | |
| 5 | -use Log; |
|
| 6 | 5 | use App\Order; |
| 7 | 6 | use App\Transaction; |
| 8 | -use Goodoneuz\PayUz\Http\Classes\BaseGateway; |
|
| 9 | -use Goodoneuz\PayUz\Controllers\Paycom\Format; |
|
| 10 | 7 | use Goodoneuz\PayUz\Controllers\Oson\Merchant; |
| 11 | -use Goodoneuz\PayUz\Controllers\Paycom\Request; |
|
| 12 | 8 | use Goodoneuz\PayUz\Controllers\Oson\OsonException; |
| 9 | +use Goodoneuz\PayUz\Controllers\Paycom\Format; |
|
| 10 | +use Goodoneuz\PayUz\Controllers\Paycom\Request; |
|
| 11 | +use Goodoneuz\PayUz\Http\Classes\BaseGateway; |
|
| 12 | +use Log; |
|
| 13 | 13 | |
| 14 | 14 | class Oson extends BaseGateway |
| 15 | 15 | { |
@@ -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,14 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Goodoneuz\PayUz\Http\Classes\Payme; |
| 3 | 3 | |
| 4 | -use App; |
|
| 5 | -use Goodoneuz\PayUz\Models\Transaction; |
|
| 6 | -use Goodoneuz\PayUz\Models\PaymentSystem; |
|
| 7 | -use Goodoneuz\PayUz\Services\PaymentService; |
|
| 8 | 4 | use Goodoneuz\PayUz\Http\Classes\DataFormat; |
| 9 | -use Goodoneuz\PayUz\Http\Classes\BaseGateway; |
|
| 10 | -use Goodoneuz\PayUz\Models\PaymentSystemParam; |
|
| 11 | 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; |
|
| 12 | 10 | use Goodoneuz\PayUz\Services\PaymentSystemService; |
| 13 | 11 | |
| 14 | 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 | { |
@@ -66,6 +66,10 @@ |
||
| 66 | 66 | PaymentService::payListener(null,$transaction,'after-pay'); |
| 67 | 67 | header("Location: ". $this->request->url); |
| 68 | 68 | } |
| 69 | + |
|
| 70 | + /** |
|
| 71 | + * @param integer $currency |
|
| 72 | + */ |
|
| 69 | 73 | public function getRedirectParams($model, $amount, $currency, $url){ |
| 70 | 74 | return [ |
| 71 | 75 | 'config' => $this->config, |
@@ -1,18 +1,14 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Goodoneuz\PayUz\Http\Classes\Stripe; |
| 3 | 3 | |
| 4 | -use App; |
|
| 5 | -use Session; |
|
| 6 | -use Stripe as StripeGateway; |
|
| 7 | -use Illuminate\Http\Request; |
|
| 8 | -use Goodoneuz\PayUz\Models\Transaction; |
|
| 9 | -use Goodoneuz\PayUz\Models\PaymentSystem; |
|
| 4 | +use Goodoneuz\PayUz\Http\Classes\BaseGateway; |
|
| 10 | 5 | use Goodoneuz\PayUz\Http\Classes\DataFormat; |
| 6 | +use Goodoneuz\PayUz\Models\PaymentSystem; |
|
| 7 | +use Goodoneuz\PayUz\Models\Transaction; |
|
| 11 | 8 | use Goodoneuz\PayUz\Services\PaymentService; |
| 12 | -use Goodoneuz\PayUz\Http\Classes\BaseGateway; |
|
| 13 | -use Goodoneuz\PayUz\Models\PaymentSystemParam; |
|
| 14 | 9 | use Goodoneuz\PayUz\Services\PaymentSystemService; |
| 15 | -use Goodoneuz\PayUz\Http\Classes\PaymentException; |
|
| 10 | +use Session; |
|
| 11 | +use Stripe as StripeGateway; |
|
| 16 | 12 | |
| 17 | 13 | class Stripe extends BaseGateway |
| 18 | 14 | { |
@@ -2,13 +2,12 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace App\Http\Controllers; |
| 4 | 4 | |
| 5 | -use App\Order; |
|
| 6 | -use App\Transaction; |
|
| 7 | 5 | use App\Http\Controllers\Paycom\Format; |
| 8 | -use App\Http\Controllers\Paycom\Request; |
|
| 9 | 6 | use App\Http\Controllers\Woywo\Merchant; |
| 10 | -use Goodoneuz\PayUz\Http\Classes\BaseGateway; |
|
| 11 | 7 | use App\Http\Controllers\Woywo\WoywoException; |
| 8 | +use App\Order; |
|
| 9 | +use App\Transaction; |
|
| 10 | +use Goodoneuz\PayUz\Http\Classes\BaseGateway; |
|
| 12 | 11 | |
| 13 | 12 | |
| 14 | 13 | class WoywoController extends BaseGateway |