Hi,
I am facing problems with passing "Amount" to PayPal page.
The problem seems to be with the field type being passed to PayPal.
Here are the fields in my Form:
===============================
Name Age Group Fee
[Name1] [AgeGroup1] [Amount1]
[Name2] [AgeGroup2] [Amount2]
==============================
Total Amount [TotalAmount]
====================================
Details of the Fields
====================================
Top Row:>> All Labels
Row 1 - 2: Data items
Name1, Name2, Name3:>> Text (single line)
Age Group1, 2 : Drop Down List with Text and Values as listed below:
AgeGroup1_Text >> AgeGroup1_value
Adult >> 10.00
Child >> 5.00
Amount1, Amount2:>> Text (single line)
TotalAmount: >> Text (single line)
I added the following Client Side event for AgeGroup1 drop down list:
$(Amount1)=$(AgeGroup1)
$(TotalAmount) = toTwoDecimals(parseInt($(AgeGroup1)) + parseInt($(AgeGroup2)))
I added the following Client Side event for AgeGroup2 drop down list:
$(Amount2)=$(AgeGroup2)
$(TotalAmount) = toTwoDecimals(parseInt($(AgeGroup1)) + parseInt($(AgeGroup2)))
whenever, I change value of the drop down list AgeGroup1, I am getting the corresponding dollar amount displayed in Amount1 field. Additionally, it is getting 'displayed in TotalAmount field (actually addition of current selections of AgeGroup1 or AgeGroup2)
So far, so good on the Form. The problem comes only after I SUBMIT the Form.
Let me also give my PayPal settings:
============ PayPal Settings============
PayPal, Production version (not test version)
PayPal String:
&item_name=Name:$(Name1)*Age-Group:$(AgeGroup1_Text)¤cy_code=USD&amount=$(AgeGroup1)
PayPal Result:
Name:John Doe*Age-Group:Adult USD 10.00 >>> This is Good!
But I really want to pass the Total Amount. And I get error when I pass any of the following:
&item_name=Name:$(Name1)*Age-Group:$(AgeGroup1_Text)¤cy_code=USD&amount=$(Amount1)
&item_name=Name:$(Name1)*Age-Group:$(AgeGroup1_Text)¤cy_code=USD&amount=$(Amount2)
&item_name=Name:$(Name1)*Age-Group:$(AgeGroup1_Text)¤cy_code=USD&amount=$(TotalAmount)
My Conclusion:
==============
when I use any numeric field (inherently defined as numeric in the form), the results are good.
For example, when I passed the "value" of the drop down option, $(AgeGroup1), it works.
Whereas, when I passed the Amount fields, it gives error stating that amount is not specified.
Just for testing purpose, I passed $(PortalID) as the amount; and it is accepted as valid
Here is my question.
===================
How to pass a value from a text field (single line Text) as the PayPal 'amount' in the PayPal string?
Any help is greatly appreciated!