I had to carefully the code snippets in the docs. As is they simply don't work.

I am now running this for my button, which is intended to draw an open field form and a button in US Dollars.

<?php
if (function_exists('lm_paypal_donate')) {
	$fca_prompt = 'What is the FCA worth to you? <br />';
	$fca_donate = lm_paypal_donate(" ", "USD", "Donation to Fairbanks Concert Assocation", "", "Donation: ", "") ;
	print $fca_prompt;
	print $fca_donate;
}
?>

Note the space in the first parameter to indicate empty.

No matter what I do, I can't get an amount field to show up and for some reason it always comes out as EUR Currency. Here is the result:


What is the FCA worth to you? <br /><form action="/node/173/devel/render" accept-charset="UTF-8" method="post" id="lm-paypal-api-payment-form"> <div><input type="hidden" name="form_build_id" id="form-11d0728a143fe352c6159bf1fb118f7c" value="form-11d0728a143fe352c6159bf1fb118f7c" /> <input type="hidden" name="form_token" id="edit-lm-paypal-api-payment-form-form-token" value="c68f591644ae4493a786828e935d19d1" /> <input type="hidden" name="form_id" id="edit-lm-paypal-api-payment-form" value="lm_paypal_api_payment_form" /> </div></form>

Here I tried the space missing and the quotes together:

<?php
if (function_exists('lm_paypal_donate')) {
	$fca_prompt = 'What is the FCA worth to you? <br />';
	$fca_donate = lm_paypal_donate("", "USD", "Donation to Fairbanks Concert Assocation", "", "Donation: ", "") ;
	print $fca_prompt;
	print $fca_donate;
}
?>

Here is the result:

<form action="/node/173/devel/render" accept-charset="UTF-8" method="post" id="lm-paypal-api-payment-form"> <div><input type="hidden" name="form_build_id" id="form-8761d12dd451e2434f7a7dde6d076198" value="form-8761d12dd451e2434f7a7dde6d076198" /> <input type="hidden" name="form_token" id="edit-lm-paypal-api-payment-form-form-token" value="c68f591644ae4493a786828e935d19d1" /> <input type="hidden" name="form_id" id="edit-lm-paypal-api-payment-form" value="lm_paypal_api_payment_form" /> </div></form>

When I force a value -- which my client specifically does not want to do --

<?php
if (function_exists('lm_paypal_donate')) {
	$fca_prompt = 'What is the FCA worth to you? <br />';
	$fca_donate = lm_paypal_donate("20", "USD", "Donation to Fairbanks Concert Assocation", "", "Donation: ", "") ;
	print $fca_prompt;
	print $fca_donate;
}
?>

I at least get a form visible, but no field for the user to modify and the value is in EURos.

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" accept-charset="UTF-8" method="post" id="lm-paypal-api-payment-form"> <div><input type="hidden" name="business" id="edit-business" value="fca_1280677090_biz@larrylowe.com" /> <input type="hidden" name="cmd" id="edit-cmd" value="_xclick" /> <input type="hidden" name="item_name" id="edit-item-name" value="Donation to Fairbanks Concert Assocation" /> <input type="hidden" name="item_number" id="edit-item-number" value="0" /> <input type="hidden" name="no_shipping" id="edit-no-shipping" value="1" /> <input type="hidden" name="return" id="edit-return" value="http://dev.fairbanksconcert.org/publish/payment/%252Fstatus" /> <input type="hidden" name="currency_code" id="edit-currency-code" value="EUR" /> Donation: <p>Proceed your Euro 20 payment</p><input type="hidden" name="amount" id="edit-amount" value="20" /> <input type="hidden" name="notify_url" id="edit-notify-url" value="http://dev.fairbanksconcert.org/lm_paypal/ipn" /> <input type="hidden" name="custom" id="edit-custom" value="1" /> <input type="submit" name="submit" id="edit-submit" value="Proceed to paypal.com" class="form-submit" /> <input type="hidden" name="form_build_id" id="form-9b8deecf5679f0b278ddd5e77d0ece79" value="form-9b8deecf5679f0b278ddd5e77d0ece79" /> <input type="hidden" name="form_token" id="edit-lm-paypal-api-payment-form-form-token" value="c68f591644ae4493a786828e935d19d1" /> <input type="hidden" name="form_id" id="edit-lm-paypal-api-payment-form" value="lm_paypal_api_payment_form" /> </div></form>

How to I get the request to be in USD and how do I put up an empty field for the donator to type in their own value?

The 2.x Dev is said to be too buggy for production and this version is recommended to solve a bug in 1.0, the reccommended, where donations would not get recorded at all via IPN.

What is the optimum, best behaving version of this module.

Comments