Skip to content

Error on completion: "Call to complete() was ignored because it has already been called. Do not call complete more than once." #26

Open
@hassanmah

Description

@hassanmah

Hey, I get the following error in console when payment is completed and it stops the page from redirecting.

Call to complete() was ignored because it has already been called. Do not call complete more than once.

My code is as follows

{{ craft.webPayments.button({ cart: craft.commerce.carts.cart, requestDetails: ['name', 'phone'], onComplete: { redirect: '/shop/checkout/order/number={number}', js: 'window.paymentCompleted(cwp.number);', }, requestShipping: 'delivery', style: { height: '52px', } }) }}

Anyone come across this before?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions