I’ve followed the Wix Pay API to Collect Payments for a Single Product tutorial which gathers user input from that page and then on the click button I call
export function button1_click(event) { createPaymentForProduct().then(payment => { wixPay.startPayment(payment.id, {“termsAndConditionsLink”: “https://www.wix.com/”}); }); }
It saves my data to my database file just fine and moves me to the “thank you” page but I never get any wix pay interface.
I have done BE_PayAPI.jsw
import wixPay from ‘wix-pay-backend’; export function createPaymentForProduct() { return wixPay.createPayment( { amount: 0.50, items: [{name: ‘DIY Robot’, price: 0.50}], } ); }
on the page I have import wixPay from ‘wix-pay’; import {createPaymentForProduct} from ‘backend/BE_PayAPI’;
Any help would be greatly appreciated, I feel like I’m so close!