Buy Now
Sign in

Paypal IPN PayPal Redirect - Full

cornelio , April 03 2019, 17:36
C
cornelio 135
April 03 2019, 17:36 #385476
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 8
April 03 2019, 22:59 #385487
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
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
GreyHead 64
April 04 2019, 14:39 #385545
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
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
C
cornelio 135
April 05 2019, 14:10 #385636
Hi Bob,
thank you very much for your kind reply.

  1. paypal variables are all received except the value of the item_number field and saved correctly on DB

  2. in the CF plugin PayPal Redirect - Full I would like to customize the value as I did for the item_name field
  3. the configuration of the cmd is _cart and upload = 1

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
Attachments
paypal_redirect.PNG
paypal_redirect.PNG
(28.96 KiB)
181 Downloads/Views
C
cornelio 135
April 08 2019, 15:31 #385753
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