Updated checkout to wait for backend confirmation before advancing, added a “Processing payment…” state with retry/ refresh fallback, and now use Paddle totals/currency for purchase records + confirmation emails (with new email translations).
This commit is contained in:
@@ -67,6 +67,28 @@ class CheckoutAuthTest extends TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_checkout_login_marks_pending_purchase_when_package_provided(): void
|
||||
{
|
||||
$user = User::factory()->create(['pending_purchase' => false]);
|
||||
$package = Package::factory()->create();
|
||||
|
||||
$response = $this->postJson(route('checkout.login'), [
|
||||
'identifier' => $user->email,
|
||||
'password' => 'password',
|
||||
'remember' => false,
|
||||
'locale' => 'de',
|
||||
'package_id' => $package->id,
|
||||
]);
|
||||
|
||||
$response->assertStatus(200)
|
||||
->assertJsonPath('user.pending_purchase', true);
|
||||
|
||||
$this->assertDatabaseHas('users', [
|
||||
'id' => $user->id,
|
||||
'pending_purchase' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_checkout_login_returns_validation_errors_with_invalid_credentials()
|
||||
{
|
||||
$response = $this->postJson(route('checkout.login'), [
|
||||
|
||||
Reference in New Issue
Block a user