Present Paystack checkout in a responsive mobile sheet and desktop modal.
Deploy Ladill Mini / deploy (push) Successful in 55s

Standardize customer-facing Ladill Pay checkout shells across products, open them on all viewports, and escape iframe callbacks back to the product flow.
This commit is contained in:
isaacclad
2026-07-21 16:50:06 +00:00
parent 5cdc0a046d
commit 8937e67c73
9 changed files with 240 additions and 54 deletions
+36 -3
View File
@@ -14,7 +14,7 @@ class MiniPaymentCheckoutTest extends TestCase
{
use RefreshDatabase;
public function test_payment_landing_shows_paystack_branding_not_momo(): void
public function test_payment_landing_shows_secure_checkout_not_momo(): void
{
$user = User::create([
'public_id' => (string) Str::uuid(),
@@ -40,9 +40,12 @@ class MiniPaymentCheckoutTest extends TestCase
$this->withHeader(\App\Support\LadillLink::INTERNAL_HEADER, '1')
->get('/q/'.$qr->short_code)
->assertOk()
->assertSee('Secured by Paystack. Powered by Ladill Pay', false)
->assertSee('Your payment is processed securely', false)
->assertSee('md:items-center', false)
->assertSee('Complete your payment', false)
->assertDontSee('MTN MoMo number', false)
->assertDontSee('Pay with MTN MoMo', false);
->assertDontSee('Pay with MTN MoMo', false)
->assertDontSee('Paystack checkout', false);
}
public function test_pay_initiation_does_not_require_phone_and_returns_paystack_checkout(): void
@@ -101,4 +104,34 @@ class MiniPaymentCheckoutTest extends TestCase
'payer_phone' => null,
]);
}
public function test_payment_callback_returns_top_frame_escape(): void
{
$user = User::create([
'public_id' => (string) Str::uuid(),
'name' => 'Vendor',
'email' => 'vendor3@example.com',
]);
$qr = QrCode::query()->create([
'user_id' => $user->id,
'short_code' => 'paycb001',
'type' => QrCode::TYPE_PAYMENT,
'label' => 'Till',
'payload' => [
'content' => [
'business_name' => 'Accra Kiosk',
'currency' => 'GHS',
],
'style' => [],
],
'is_active' => true,
]);
$this->withHeader(\App\Support\LadillLink::INTERNAL_HEADER, '1')
->get('/q/'.$qr->short_code.'/pay/callback')
->assertOk()
->assertSee('Confirming your payment', false)
->assertSee('window.top.location.replace', false);
}
}