Did you code your Payment-Button?
For example, like this? From the backend?
*************************
* backend code - pay.jsw *
*************************/
import wixPayBackend from 'wix-pay-backend';
import wixLocation from 'wix-location';
export function createMyPayment() {
return wixPayBackend.createPayment({
items: [{
name: "Product Name",
price: 9.99
}],
amount: 19.98
} );
}
/********************
* client-side code *
********************/
import {createMyPayment} from 'backend/pay';
import wixPay from 'wix-pay';
export function myButton_click(event, $w) {
createMyPayment()
.then( (payment) => {
wixPay.startPayment(payment.id);
} );
}
So if yes, perhaps you could doing something like…
export function myButton_click(event, $w) {
createMyPayment()
.then( (payment) => {
wixPay.startPayment(payment.id);
//expand code here with your own (after payment was done).
//redirection...
wixLocation.to("http://wix.com");
} );
}
This is just an idea, not a solution! Not tested!