wip
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
use App\Models\Auth\Verification;
|
use App\Models\Auth\Verification;
|
||||||
use App\Models\Ecommerce\Channel\Channel;
|
use App\Models\Ecommerce\Channel\Channel;
|
||||||
use App\Models\Ecommerce\Product\Inventory\Inventory;
|
use App\Models\Ecommerce\Product\Inventory\Inventory;
|
||||||
use App\Models\System\Settings\Settings;
|
|
||||||
use App\Repositories\Ecommerce\Product\Barcode\BarcodeRepository;
|
use App\Repositories\Ecommerce\Product\Barcode\BarcodeRepository;
|
||||||
use Illuminate\Http\Client\PendingRequest;
|
use Illuminate\Http\Client\PendingRequest;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
@@ -355,7 +354,7 @@ if (! function_exists('calculateProductPriceAmount')) {
|
|||||||
*/
|
*/
|
||||||
function halkbankCredentials(string $key = ''): int|string|array
|
function halkbankCredentials(string $key = ''): int|string|array
|
||||||
{
|
{
|
||||||
return match($key) {
|
return match ($key) {
|
||||||
'username' => 516122500260,
|
'username' => 516122500260,
|
||||||
'password' => 'MrZsO9wfgWOBjf4',
|
'password' => 'MrZsO9wfgWOBjf4',
|
||||||
default => [
|
default => [
|
||||||
|
|||||||
@@ -47,14 +47,14 @@ class OrderController extends Controller
|
|||||||
$url = $response['url'];
|
$url = $response['url'];
|
||||||
|
|
||||||
$order->update([
|
$order->update([
|
||||||
'halkbank_id' => $response['orderId']
|
'halkbank_id' => $response['orderId'],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->rest([
|
return response()->rest([
|
||||||
'order_id' => $order->id,
|
'order_id' => $order->id,
|
||||||
'payment_url' => $url
|
'payment_url' => $url,
|
||||||
], 201);
|
], 201);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class OnlinePaymentController extends Controller
|
|||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$request->validate([
|
$request->validate([
|
||||||
'orderId' => ['required', 'string']
|
'orderId' => ['required', 'string'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$resource = Order::query()->where('halkbank_id', $request->orderId)->first();
|
$resource = Order::query()->where('halkbank_id', $request->orderId)->first();
|
||||||
@@ -46,7 +46,7 @@ class OnlinePaymentController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function view(
|
public function view(
|
||||||
$status = false,
|
$status,
|
||||||
$message,
|
$message,
|
||||||
string $pnr = '-',
|
string $pnr = '-',
|
||||||
string $branch_name = 'MM.COM.TM',
|
string $branch_name = 'MM.COM.TM',
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ class TestController extends Controller
|
|||||||
public function ok()
|
public function ok()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (! app()->isProduction()) {
|
if (! app()->isProduction()) {
|
||||||
auth()->login(User::where('email', 'nurmuhammet@mail.com')->first());
|
auth()->login(User::where('email', 'nurmuhammet@mail.com')->first());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user