mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-02 09:04:35 -04:00
Tests: Failed/canceled payments
This commit is contained in:
parent
79637d18d2
commit
29e006f950
@ -377,7 +377,6 @@ class CompanyGateway extends BaseModel
|
|||||||
|
|
||||||
public function webhookUrl()
|
public function webhookUrl()
|
||||||
{
|
{
|
||||||
return 'https://invoiceninja.com';
|
|
||||||
return route('payment_webhook', ['company_key' => $this->company->company_key, 'company_gateway_id' => $this->hashed_id]);
|
return route('payment_webhook', ['company_key' => $this->company->company_key, 'company_gateway_id' => $this->hashed_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,4 +53,50 @@ class BancontactTest extends DuskTestCase
|
|||||||
->assertSee('Completed');
|
->assertSee('Completed');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testOpenPayments(): void
|
||||||
|
{
|
||||||
|
$this->browse(function (Browser $browser) {
|
||||||
|
$browser
|
||||||
|
->visitRoute('client.invoices.index')
|
||||||
|
->click('@pay-now')
|
||||||
|
->press('Pay Now')
|
||||||
|
->clickLink('Undefined.')
|
||||||
|
->waitForText('Test profile')
|
||||||
|
->radio('final_state', 'open')
|
||||||
|
->press('Continue')
|
||||||
|
->waitForText('Details of the payment')
|
||||||
|
->assertSee('Pending');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
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')
|
||||||
|
->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')
|
||||||
|
->radio('final_state', 'canceled')
|
||||||
|
->press('Continue')
|
||||||
|
->waitForText('Cancelled.');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user