wip
This commit is contained in:
@@ -4,13 +4,26 @@ namespace App\Repos\Payment;
|
||||
|
||||
use App\Models\Payment\ApiKeyHalkbank;
|
||||
use App\Models\Payment\OnlinePaymentHistory;
|
||||
use App\Repos\Order\OrderRepo;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class OnlinePaymentRepo
|
||||
{
|
||||
/**
|
||||
* Pending orders are brand new orders that have not been processed yet.
|
||||
*/
|
||||
public const PENDING = 'pending';
|
||||
|
||||
/**
|
||||
* Failed orders are existing orders that could be paid
|
||||
*/
|
||||
public const FAILED = 'failed';
|
||||
|
||||
/**
|
||||
* Paid orders are existing order that could be paid successfully
|
||||
*/
|
||||
public const PAID = 'paid';
|
||||
|
||||
/**
|
||||
* Pay card order
|
||||
*
|
||||
@@ -58,7 +71,7 @@ class OnlinePaymentRepo
|
||||
'errorUrl' => route('online-payment-store'),
|
||||
'api_client' => config('app.url'),
|
||||
'username' => $resource->branch->billing_username,
|
||||
'paymentStatus' => OrderRepo::PENDING,
|
||||
'paymentStatus' => self::PENDING,
|
||||
]);
|
||||
|
||||
return [
|
||||
@@ -74,4 +87,12 @@ class OnlinePaymentRepo
|
||||
{
|
||||
return ApiKeyHalkbank::generateOrderNumber($resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* Status view
|
||||
*/
|
||||
public static function statusView(): string
|
||||
{
|
||||
return 'orders.cards.online-payment.status';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user