wip
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Modules\HalkbankOnlinePayment\Controllers;
|
namespace App\Modules\HalkbankOnlinePayment\Controllers;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Modules\CardOrder\Models\CardOrder;
|
||||||
use App\Modules\HalkbankOnlinePayment\Repositories\HalkbankOnlinePaymentRepository;
|
use App\Modules\HalkbankOnlinePayment\Repositories\HalkbankOnlinePaymentRepository;
|
||||||
use App\Modules\OnlinePayment\Repositories\OnlinePaymentRepository;
|
use App\Modules\OnlinePayment\Repositories\OnlinePaymentRepository;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
@@ -16,7 +17,7 @@ class HalkbankOnlinePaymentController extends Controller
|
|||||||
'orderId' => ['required', 'string', 'max:50', 'exists:online_payments,orderId'],
|
'orderId' => ['required', 'string', 'max:50', 'exists:online_payments,orderId'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$onlinePaymentRepository = OnlinePaymentRepository::make()
|
$onlinePaymentRepository = OnlinePaymentRepository::make(CardOrder::class)
|
||||||
->paymentProvider(new HalkbankOnlinePaymentRepository);
|
->paymentProvider(new HalkbankOnlinePaymentRepository);
|
||||||
|
|
||||||
$paymentStatus = $onlinePaymentRepository->checkPayment($request->string('orderId'));
|
$paymentStatus = $onlinePaymentRepository->checkPayment($request->string('orderId'));
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class OnlinePaymentRepository
|
|||||||
*/
|
*/
|
||||||
protected string $paymentLink;
|
protected string $paymentLink;
|
||||||
|
|
||||||
public function __construct(?Model $relatedModel)
|
public function __construct(?Model $relatedModel = null)
|
||||||
{
|
{
|
||||||
$this->relatedModel = $relatedModel;
|
$this->relatedModel = $relatedModel;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user