Wix Payment Plan Returning Cancelled On Payment

I created a site that lets customers list a product and then after they submit it makes them pay for a recurring plan and if they do not pay it will delete their listing.

However when someone does complete a payment it returns the same thing as if they were to close out of the payment window.

Here is the code snippet of the code that runs on this page.

let user = wixUsers.currentUser

$w.onReady(function () {
    $w("#dataset1").onReady(()=> {
        $w("#dataset1").onAfterSave((results)=> {
function testPayment(results) {
const paymentPlan = "11e807fb-8ee2-4df0-966a-769fa55e0d3a"
 let status = purchase.wixPayStatus
 let orderId = purchase.wixPayOrderId
 if (status !== "Successful") {
 let listingId = results._id
                wixData.remove("ListedProducts", listingId).then(()=> {
                    console.log("listing failed")
 } else {



Let me know if anyone knows why this issue would be happening.

Thanks in advanced for your help.