mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
wip
This commit is contained in:
parent
5f45a72445
commit
66c81d9b51
@ -119,7 +119,7 @@ class StripePaymentDriver extends BaseDriver
|
||||
$types[] = GatewayType::BANK_TRANSFER;
|
||||
}
|
||||
|
||||
if ($this->company_gateway->getAchEnabled()
|
||||
if ($this->company_gateway->getAlipayEnabled()
|
||||
&& $this->client
|
||||
&& isset($this->client->country)
|
||||
&& in_array($this->client->country->iso_3166_3, ['AUS', 'DNK', 'DEU', 'ITA', 'LUX', 'NOR', 'SVN', 'GBR', 'AUT', 'EST', 'GRC', 'JPN', 'MYS', 'PRT', 'ESP', 'USA', 'BEL', 'FIN', 'HKG', 'LVA', 'NLD', 'SGP', 'SWE', 'CAN', 'FRA', 'IRL', 'LTU', 'NZL', 'SVK', 'CHE'])) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"video": false,
|
||||
"baseUrl": "https://localhost:8000/",
|
||||
"baseUrl": "http://localhost:8080/",
|
||||
"chromeWebSecurity": false,
|
||||
"env": {
|
||||
"runningEnvironment": "native"
|
||||
"runningEnvironment": "docker"
|
||||
}
|
||||
}
|
||||
|
68
cypress/integration/client_portal/stripe_ach.spec.js
vendored
Normal file
68
cypress/integration/client_portal/stripe_ach.spec.js
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
describe('Stripe: ACH testing', () => {
|
||||
before(() => {
|
||||
// cy.artisan('migrate:fresh --seed');
|
||||
// cy.artisan('ninja:create-single-account checkout');
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
cy.viewport('macbook-13');
|
||||
cy.clientLogin();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
cy.visit('/client/logout');
|
||||
});
|
||||
|
||||
it('should be able to add bank account & verify it', function () {
|
||||
cy.visit('/client/payment_methods');
|
||||
|
||||
cy.get('[data-cy=add-payment-method]').click();
|
||||
cy.get('[data-cy=add-bank-account-link]').click();
|
||||
|
||||
cy.get('#account-holder-name').type('Invoice Ninja Rocks');
|
||||
cy.get('#country').select('US');
|
||||
cy.get('#currency').select('USD');
|
||||
cy.get('#routing-number').type('110000000');
|
||||
cy.get('#account-number').type('000123456789');
|
||||
cy.get('#accept-terms').check();
|
||||
|
||||
cy.get('#save-button').click();
|
||||
|
||||
cy.url().should('contain', 'method=2');
|
||||
|
||||
cy.get('[data-cy=verification-1st]').type('32');
|
||||
cy.get('[data-cy=verification-2nd]').type('45');
|
||||
|
||||
cy.get('#pay-now').click();
|
||||
|
||||
cy.get('body').contains('Verification completed successfully');
|
||||
});
|
||||
|
||||
it('should be able to pay the invoice', function () {
|
||||
cy.visit('/client/invoices');
|
||||
|
||||
cy.get('[data-cy=pay-now]').first().click();
|
||||
cy.get('[data-cy=pay-now-dropdown]').click();
|
||||
cy.get('[data-cy=pay-with-1]').click();
|
||||
|
||||
cy.get('[name=payment-type]').first().check();
|
||||
|
||||
cy.get('#pay-now').click();
|
||||
|
||||
cy.url().should('contain', '/client/payments/');
|
||||
});
|
||||
|
||||
it('should be able to remove payment method', function () {
|
||||
cy.visit('/client/payment_methods');
|
||||
|
||||
cy.get('[data-cy=view-payment-method]').click();
|
||||
|
||||
cy.get('#open-delete-popup').click();
|
||||
|
||||
cy.get('[data-cy=confirm-payment-removal]').click();
|
||||
|
||||
cy.url().should('contain', '/client/payment_methods');
|
||||
|
||||
cy.get('body').contains('Payment method has been successfully removed.');
|
||||
});
|
||||
});
|
29
cypress/integration/client_portal/stripe_alipay.spec.js
vendored
Normal file
29
cypress/integration/client_portal/stripe_alipay.spec.js
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
describe('Stripe: Alipay testing', () => {
|
||||
before(() => {
|
||||
// cy.artisan('migrate:fresh --seed');
|
||||
// cy.artisan('ninja:create-single-account checkout');
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
cy.viewport('macbook-13');
|
||||
cy.clientLogin();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
cy.visit('/client/logout');
|
||||
});
|
||||
|
||||
it('should be able to pay using Alipay', function () {
|
||||
cy.visit('/client/invoices');
|
||||
|
||||
cy.get('[data-cy=pay-now]').first().click();
|
||||
cy.get('[data-cy=pay-now-dropdown]').click();
|
||||
cy.get('[data-cy=pay-with-1]').click();
|
||||
|
||||
cy.get('#pay-now').click();
|
||||
|
||||
cy.get('.common-ButtonGroup > .common-Button--default').click();
|
||||
|
||||
cy.url().should('contain', '/client/payments/');
|
||||
});
|
||||
});
|
29
cypress/integration/client_portal/stripe_sofort.spec.js
vendored
Normal file
29
cypress/integration/client_portal/stripe_sofort.spec.js
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
describe('Stripe: SOFORT testing', () => {
|
||||
before(() => {
|
||||
// cy.artisan('migrate:fresh --seed');
|
||||
// cy.artisan('ninja:create-single-account checkout');
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
cy.viewport('macbook-13');
|
||||
cy.clientLogin();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
cy.visit('/client/logout');
|
||||
});
|
||||
|
||||
it('should be able to pay using SOFORT', function () {
|
||||
cy.visit('/client/invoices');
|
||||
|
||||
cy.get('[data-cy=pay-now]').first().click();
|
||||
cy.get('[data-cy=pay-now-dropdown]').click();
|
||||
cy.get('[data-cy=pay-with-2]').click();
|
||||
|
||||
cy.get('#pay-now').click();
|
||||
|
||||
cy.get('.common-ButtonGroup > .common-Button--default').click();
|
||||
|
||||
cy.url().should('contain', '/client/payments/');
|
||||
});
|
||||
});
|
@ -11,15 +11,15 @@
|
||||
<input type="hidden" name="source" value="{{ $token->token }}">
|
||||
|
||||
@component('portal.ninja2020.components.general.card-element', ['title' => '#1 ' . ctrans('texts.amount')])
|
||||
<input type="text" name="transactions[]" class="w-full input" required>
|
||||
<input type="text" name="transactions[]" class="w-full input" required data-cy="verification-1st">
|
||||
@endcomponent
|
||||
|
||||
@component('portal.ninja2020.components.general.card-element', ['title' => '#2 ' . ctrans('texts.amount')])
|
||||
<input type="text" name="transactions[]" class="w-full input" required>
|
||||
<input type="text" name="transactions[]" class="w-full input" required data-cy="verification-2nd">
|
||||
@endcomponent
|
||||
|
||||
|
||||
@component('portal.ninja2020.gateways.includes.pay_now', ['type' => 'submit'])
|
||||
{{ ctrans('texts.complete_verification')}}
|
||||
@endcomponent
|
||||
</form>
|
||||
@endsection
|
||||
@endsection
|
||||
|
Loading…
Reference in New Issue
Block a user