online payments for card order
This commit is contained in:
@@ -59,6 +59,16 @@ class CardOrderModule implements ModuleContract
|
||||
name: 'Branch',
|
||||
message: 'This module is used for branches.',
|
||||
),
|
||||
new ModulePackage(
|
||||
type: ModulePackageType::MODULE,
|
||||
name: 'OrderStatus',
|
||||
message: 'Supports orders.',
|
||||
),
|
||||
new ModulePackage(
|
||||
type: ModulePackageType::MODULE,
|
||||
name: 'OnlinePayment',
|
||||
message: 'Is online payable.',
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ use App\Models\User;
|
||||
use App\Modules\Branch\Interfaces\BelongsToBranch;
|
||||
use App\Modules\Branch\Models\Branch;
|
||||
use App\Modules\LoanOrder\Repositories\LoanOrderRepository;
|
||||
use App\Modules\OnlinePayment\Contracts\HasOnlinePayments;
|
||||
use App\Modules\OrderStatus\Interfaces\HasStatus;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
@@ -19,7 +19,7 @@ class CardOrderRepository
|
||||
/** @var \App\Modules\Branch\Models\Branch */
|
||||
$branch = $record->branch;
|
||||
|
||||
return OnlinePaymentRepository::make()
|
||||
return OnlinePaymentRepository::make(relatedModel: $record)
|
||||
->paymentProvider(
|
||||
HalkbankOnlinePaymentRepository::make()
|
||||
->setUsername($branch->billingUsername())
|
||||
|
||||
Reference in New Issue
Block a user