Using noty plugin (confirm type) with an if statement.

Using noty plugin (confirm type) with an if statement.

I have a Javascript function that receives one variable, which has two possible values:  BT or PP.  It calls the JQuery noty plugin and creates a confirmation popup box, but it only works partially.  If the passed in variable is BT, everything works as expected.  But if the passed in variable is PP, the popup box only displays a portion of the whole box, and then it disappears before the user can click a button to make a selection.  The code is below.  Any help in figuring this out is greatly appreciated!!

function confirmPurchase(pType) {
   $("body").css("cursor", "progress");
   if (pType==="BT") { 
       var vUsing="credit card?";
       var vAttrAction="transaction.php";
       var vText="Validating your credit card purchase and generating your Personalized Chart.";
   } else if (pType==="PP") { 
       var vUsing="PayPal account?";
       var vAttrAction="transaction2.php";
       var vText="Validating your data entry and preparing to contact PayPal.";
   }
   
  // NOTE:  Code that creates the variables "fullName" and "mydate" reside elsewhere.
   
   var vtxt = "You wish to purchase a chart for "+fullName+", born "+mydate+" using your "+vUsing;
   var n = noty({
      text: vtxt,
      type: 'confirm',
      dismissQueue: false,
      layout: 'center',
      theme: 'defaultTheme',
      buttons: [
          {addClass: 'btn btn-primary', text: 'Yes', onClick: function($noty) {
              $noty.close();
              noty({text: vText, type: 'success'});
              allCaps();
              $("#payment-form").attr("action",vAttrAction);
              $("#payment-form").submit();
            }
          },
          {addClass: 'btn btn-danger', text: 'Cancel', onClick: function($noty) {
              $noty.close();
              genNoty('Purchase canceled.','error');
              $("body input").css("cursor", "auto");
            }
          }
      ]
   }) 
} // End function confirmPurchase()

Any help in figuring this out would be greatly appreciated!!