discord-paypal-calc
v1.0.6
Published
Calculate Your Paypal Amount To Percentage Fee & Fixed Fee & Total Fee, this discord-paypal are going to make your life calculate easy, to make more information about this package go read in README to know more...
Downloads
11
Readme
paypal calc
use this format to calc your fee and the total from the amount using paypal payment .
const { calcUSD, calcILS } = require('discord-paypal-calc');
const { Percentage, fixedFee, totalFee } = calcUSD(amount) // do this format & insted of the amount use your content type if its in slash command use like this :
.addStringOption(option => option.setName('amount').setDescription('The Amount').setRequired(true)),
async execute (interaction) {
const amount = interaction.options.getString('amount');
if(amount) {
try {
const { Percentage, fixedFee, totalFee } = calcUSD(amount) // this is the amount content that i typed in the string Option up below .
'Amount' = amount
'PercentageFee' = Percentage
'FixedFee' = fixedFee
'TotalFee' = totalFee
} catch (err) {
console.error('There is an error', err);
}
}
}