Reply To: Integrate with PayPal variable amount

Home Forums Quform WordPress Integrate with PayPal variable amount Reply To: Integrate with PayPal variable amount

#37291
janheu
Participant

Hi,
i would like to use paypal in a form where ppl can select different products and configurations.
The amount is shown in different fields, once they´ve chosen a product and config.
Somehow currently Paypal just recognizes the shipping costs.
when i embed the same fields into mails it works like it should.
Currently i´m using a setup like this to get the amount.

$amount = $form->getValue('quform_1_121') ?? $form->getValue('quform_1_131') ?? $form->getValue('quform_1_136') ?? $form->getValue('quform_1_145');
if ($amount) {
// remove currency
$amount = str_replace(['€', ' '], '', $amount);
$amount = number_format((float)$amount, 2, '.', '');
} else {
$amount = '0.00';
}
$quantity = $form->getValue('quform_1_65') ?? $form->getValue('quform_1_34') ?? $form->getValue('quform_1_43') ?? $form->getValue('quform_1_138') ?? $form->getValue('quform_1_144');
$quantity = $quantity ?: '1';
$url = add_query_arg(array(
'cmd' => '_cart',
'upload' => '1',
'charset' => 'utf-8' ...

Any idea why its not grabbing the value correctly?

Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy