Paypal IPN PayPal Redirect - Full

cornelio 03 Apr, 2019
I set up a multi items cart (_cart) according to your guide, but I don't get back the values of item_number and price.
How and where should I set these values on PayPal Redirect - Full .

How can I add fields such as a color dropdown?
I tried setting plugin a custom field and everything is loaded correctly.

Best regards
Cornelio
healyhatman 03 Apr, 2019
I don't know (you need Bob to help with v5) but let me just say

DO NOT USE FRONTEND PRICE VALUES FOR CALCULATING YOUR BACKEND PRICES. If I open up your form, I can use devtools to set all the prices to $0.

Frontend prices should only be for display to the user, not for sending to PayPal. Store your prices in a database or just use PHP to calculate them with hardcoded values
GreyHead 04 Apr, 2019
Hi Cornelio,

Please see this note from the action: "The field name holding the item's title, if the field value is an array then multiple items will be shown on the PayPal page, and both the amount and quantity fields should be of type array too. also for this to work, the Command should be set to '_cart' and you should add upload="1" to the extra params box."

If PayPal is not returning these values then I suggest that you set an ID for the transaction and save the data in a database table before redirecting to PayPal, you can include the ID in the data sent to PayPal and use it to recover the data after the IPN confirmation is received.

There are two ways to save the data in your database - the better one is to use two tables: the first to record the transaction data, the second with one row for each item in the cart identified by the transaction/record ID. The alternative, which is simpler is to json encode the data before saving and add it to a text column in the table along with the transaction data.

Bob
cornelio 05 Apr, 2019
Hi Bob,
thank you very much for your kind reply.[ol][li]
paypal variables are all received except the value of the item_number field and saved correctly on DB[/li][li][br]in the CF plugin PayPal Redirect - Full I would like to customize the value as I did for the item_name field[/li][li]the configuration of the cmd is _cart and upload = 1[/li][/ol][file=11955]paypal_redirect.PNG[/file]
[br]if I insert the script of the paypal plugin in the custom module everything works properly with entering the passthru fields
<td><input type="hidden" id="item_name_<?php echo $i;?>" name="item_name_<?php echo $i;?>" value="<?php echo  $i .' Formato: '.$split_size[1];?>"></td> 
<td><input type="hidden" id="item_number_<?php echo $i;?>" name="item_number_<?php echo $i;?>" value="<?php echo $content[$name];?>"></td>
Regards
Cornelio
cornelio 08 Apr, 2019
Hi Bob,
I noticed that modifying the code of the CF plugin of the files at lines below
the transposition of the field item_number happens correctly.
I would like to ask you if the procedure followed could be accepted or have suggestions.

administrator\components\com_chronoforms5\chronoforms\locales\en_gb\lang.php
administrator\components\com_chronoforms5\chronoforms\actions\paypal_redirect\paypal_redirect.php
administrator\components\com_chronoforms5\chronoforms\actions\co_sender\co_sender.php
administrator\components\com_chronoforms5\chronoforms\actions\paypal_data\paypal_data.php
Best Regards
Cornelio
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger