mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 22:22:32 +01:00
Tests: Canceled payments
This commit is contained in:
parent
4a475d9ef0
commit
dec33daae3
@ -377,7 +377,6 @@ class CompanyGateway extends BaseModel
|
||||
|
||||
public function webhookUrl()
|
||||
{
|
||||
return 'https://invoiceninja.com';
|
||||
return route('payment_webhook', ['company_key' => $this->company->company_key, 'company_gateway_id' => $this->hashed_id]);
|
||||
}
|
||||
|
||||
|
@ -54,4 +54,36 @@ class KBCTest extends DuskTestCase
|
||||
->assertSee('Completed');
|
||||
});
|
||||
}
|
||||
|
||||
public function testFailedPayment(): void
|
||||
{
|
||||
$this->browse(function (Browser $browser) {
|
||||
$browser
|
||||
->visitRoute('client.invoices.index')
|
||||
->click('@pay-now')
|
||||
->press('Pay Now')
|
||||
->clickLink('Undefined.')
|
||||
->waitForText('Test profile')
|
||||
->press('CBC')
|
||||
->radio('final_state', 'failed')
|
||||
->press('Continue')
|
||||
->waitForText('Failed.');
|
||||
});
|
||||
}
|
||||
|
||||
public function testCancelledTest(): void
|
||||
{
|
||||
$this->browse(function (Browser $browser) {
|
||||
$browser
|
||||
->visitRoute('client.invoices.index')
|
||||
->click('@pay-now')
|
||||
->press('Pay Now')
|
||||
->clickLink('Undefined.')
|
||||
->waitForText('Test profile')
|
||||
->press('CBC')
|
||||
->radio('final_state', 'canceled')
|
||||
->press('Continue')
|
||||
->waitForText('Cancelled.');
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user