Checkout Amount from Variable

I’m having trouble with
Passing a calculated variable to the Checkout amount.

Working in
WIX Studio, pay.jsw

Site link

What I’m trying to do
I have an old form that collects up to 10 donations, subtotals the donations, adds the processing fee & percentage, and calculates the total. I need to pass the Total to the wixPayBackend CreateMyPayment function.

What I’ve tried so far
The code mostly works, no errors. But passes the subtotal instead of the total. Any guidance is appreciated.

Extra context
Pay.jsw

import wixPayBackend from ‘wix-pay-backend’;

export function createMyPayment(AmountTotal) {

let paymentInfo = {

"items": \[ 

  {

    name: "Add-On Donation",

    price: AmountTotal

  },

\],

amount: AmountTotal

}

return wixPayBackend.createPayment(paymentInfo);

}

Page Code

export function AmountChanged(event) {

**let** a01 = Number($w('#Amount01').value);

**let** a02 = Number($w('#Amount02').value);

**let** a03 = Number($w('#Amount03').value);

**let** a04 = Number($w('#Amount04').value);

**let** a05 = Number($w('#Amount05').value);

**let** a06 = Number($w('#Amount06').value);

**let** a07 = Number($w('#Amount07').value);

**let** a08 = Number($w('#Amount08').value);

**let** a09 = Number($w('#Amount09').value);

**let** a10 = Number($w('#Amount10').value);

**let** AllAmounts = (a01 + a02 + a03 + a04 + a05 + a06 + a07 + a08 + a09 + a10);

    console.log("AllAmounts: ", AllAmounts);



    **let** PercentageAmount = (AllAmounts\*.029);

    console.log("Percentage Amount: ", PercentageAmount);

    **let** fPercentageAmount = PercentageAmount.toFixed(2);

    console.log("Formatted Percentage Amount: ", fPercentageAmount);

    

    **let** ProcessingFee = .30;

    console.log("Processing Fee:", ProcessingFee);

    **let** fProcessingFee = ProcessingFee.toFixed(2);

    console.log("Formatted Processing Fee", fProcessingFee);

    

    $w('#inputSubtotal').value = String(AllAmounts.toFixed(2)); 

    $w('#inputPercentage').value = String(fPercentageAmount);

    $w('#inputProcessingFee').value = String(fProcessingFee);

    

    **let** AmountTotal = (AllAmounts + PercentageAmount + ProcessingFee);

    console.log("Amount Total: ", AmountTotal);

    **let** fAmountTotal = AmountTotal.toFixed(2);

    

    $w('#AmountTotal').value = String(fAmountTotal);

    console.log("Amount Total: ", $w('#AmountTotal').value);

}