websolutions_uk on "[Plugin: Contact Form 7 - PayPal Extension] Pass drop down value to itemname"

ساخت وبلاگ

latortuga
Member
Posted 6 months ago #

Hi,

I am trying to pass the value the user selects from a dropdown to paypal. The users will be using the contact form to register for a touament, picking the division they want to play in. I need the division name and amount passed to paypal. Is this possible? With the code below I get this error: "You are not redirected to PayPal as you have not entered form values properly."

<p>Item amount
[select* itemamount id:itemamount include_blank "Mens I" "Mens II" "Womens I" "Womens II" "Coed I"] </p>

[hidden itemname id:itemname itemamount]

[paypalsubmit id:btnPayPal email:[email protected] itemamount:itemamount itemname:itemname retu_url:http://ourwebsite.org/resgistrationsuccess cancel_url:http://ourwebsite.org/registration "Pay with PayPal"]

https://wordpress.org/plugins/contact-form-7-paypal-extension/

Hi latortuga,

First of all you need to use integer value in Itemamount field which is pass to PayPal as price. And Item Name use as string.

Please check our document regarding setting of fields for Paypal.
Link :
https://opensource.zealousweb.com/wp-content/uploads/2015/08/Contact_form_7-PayPal_Extension.pdf

Thanks,
Zealousweb

latortuga
Member
Posted 6 months ago #

I understand. I am able to get the values parsed that I need and it sends correctly in the email. But still getting the PayPal error. Does CF7 not parse the info before sending to PayPal? But does when emails?

<p>Item amount
[select* itemamount id:itemamount include_blank "Mens I ($95)|95" "Mens II ($100)|100" "Womens I|102" "Womens II|115" "Coed I|105"]</p>
[hidden itemname id:itemname _raw_itemamount]

Email fields:

Paid: [itemamount]
Division: [_raw_itemamount]

Results in email:
Paid: 95
Division: Mens I ($95)

Hi latortuga,

We are cheeking this problem and trying to resolve this issue.

But if you want to it working for now , need to just add simple select box as HTML like below :

<select id="itemamount" name="itemamount"> <option value="">---</option> <option value="95">Mens I ($95)</option> <option value="100">Mens II ($100)</option> <option value="200">Womens I</option> <option value="300">Womens II</option> <option value="350">Coed I</option>
</select>

Thanks
ZealousWeb

latortuga
Member
Posted 6 months ago #

Thank you, but I don't see the difference with using a select box vs the select shortcode. It still doesn't pass the item name. If one picked <option value="95">Mens I ($95)</option>

I would need to pass the value of "95" to paypal as the amount to be paid (or itemamount). It is doing that. I also need the text of "Mens I" to be sent to paypal as the item name.

I've tried various ways of passing the values in the hidden field, but still not getting it.

Hi latortuga,

Yes , It's pass Item amount in PayPal not Item name from Select Box.

We will consider this point in our next released version and try to solve out for select box field.

Thanks,
ZealousWeb

latortuga
Member
Posted 6 months ago #

So, it looks like adding a standard paypal button to the form doesn't work either? Conflicts with the submit action.

latortuga
Member
Posted 6 months ago #

1. So, it looks like adding a standard paypal button to the form doesn't work either? Conflicts with the submit action.

2. I'm working on it now, but not sure it will work. Can I use one page to have the user select an option value (the Division choice in this instance) and have that form pass the value in the url. Then use something like `get_header();
$name = $_REQUEST['divisionchoice'];
?>
`
to pull that value and populate the itemname for paypal?

Thank you.

latortuga
Member
Posted 6 months ago #

Additionally, I found this: http://contactform7.com/getting-default-values-from-the-context/

I tried this: [itemname default:get]
It does not pull the itemname from the url, just prints [itemname default:get] as text.

Does that method no longer work?

Hi latortuga,

>> You no need to add standard PayPal button , because Our created button is worked same like that. Redirect on PayPal with Item Name , Price and come back on Retu URL. Btu it's take data from form's fields that's why has some limitations.

>> You can get data from URL using get/request. But we need to check how can you pass your value in URL.

If you need more support then you can contact us on below link for Paid Support :
http://opensource.zealousweb.com/contact-us/

Thanks,
ZealousWeb

Hope this has been resolved now.

Thanks!

websolutions_uk
Member
Posted 15 minutes ago #

Hi

I am trying to get my head around this as well.

Any luck on this as my client needs the same drop down with prices.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 64 تاريخ : شنبه 4 ارديبهشت 1395 ساعت: 18:21