Community Support Forums — WordPress® ( Users Helping Users ) — 2010-10-28T10:47:21-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=1111 2010-10-28T10:47:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1111&p=4361#p4361 <![CDATA[Re: button values not feeding to PayPal]]>
Once again, THANKS!

Statistics: Posted by KirkWard — October 28th, 2010, 10:47 am


]]>
2010-10-27T22:26:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1111&p=4344#p4344 <![CDATA[Re: button values not feeding to PayPal]]> Thanks for the great questions.


First, why doesn't the raw button code work?

I recommend the Shortcode format for your PayPal Buttons, because the WordPress® Visual Editor has a very bad habit of mangling raw HTML code. Using the Full Button Code inside WordPress® will often lead to corruption, such as you're describing.

Also, in order to suppress automatic paragraphs and entity conversions that WordPress® injects through its built-in content filters, you will need to install a plugin like this if you're going to use raw HTML.
- Raw HTML plugin: http://wordpress.org/extend/plugins/raw-html/


second, how do I get my CV code into the CUSTOM field?

Using the Shortcode format, do something like this.
Code:
[s2Member-PayPal-Button ... custom="www.example.com|something|something" /]

If you're trying to grab the user's IP address, install the Exec-PHP plugin, and do something like this:
Code:
[s2Member-PayPal-Button ... custom="www.example.com|<?php echo esc_attr($_SERVER["REMOTE_ADDR"]); ?>" /]
%%cv1%% now equals = the Member's IP address.

------------ for the benefit of other readers ---------------------

Custom Replacement Codes can be inserted using these instructions:

%%cv0%% = The domain of your site, which is passed through the `custom` attribute in your Shortcode.
%%cv1%% = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute, inside your Shortcode, like this: custom="www.example.com|cv1|cv2|cv3".

You can have an unlimited number of custom variables that track IP addresses, affiliate IDs, etc. In some cases you may need to use PHP code to insert a value into the custom field dynamically. Obviously this is for advanced webmasters, but the functionality has been made available for those who need it.

Statistics: Posted by Jason Caldwell — October 27th, 2010, 10:26 pm


]]>
2010-10-27T20:10:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1111&p=4333#p4333 <![CDATA[button values not feeding to PayPal]]>
The first item I noted was that the beginning and ending brackets from the amount field that was commented out were modified by something on my site, leaving the brackets and a line break. I don't know if this was done by a plugin or Wordpress.

Here is the before ...
Code:
<!-- <input type="hidden" name="amount" value="0.01" /> -->

Here is the after ...
Code:
<br />
<!--<br />
<input type="hidden" name="amount" value="0.01" /> &#8211;></p>


In addition, I received an error message from PayPal that said ...

Invalid first trial period. You must specify valid values for the A1, P1, and T1 parameters for a subscription.

But, the code in the button was ...
Code:
<input type="hidden" name="a1" value="0.00" />
<input type="hidden" name="p1" value="0" />
<input type="hidden" name="t1" value="D" />


By deleting these three lines and removing the commented "amount" line, the button did take me to PayPal.

I then cut and pasted the button shortcode into the same page and it worked properly.

So, from this I learned that the button code does not work directly in a page.

But, I need to add %cv's% to the CUSTOM field.

First, why doesn't the raw button code work, second, how do I get my CV code into the CUSTOM field, and third, would the button code, modified as I describe, work with s2?

Cheers and felicitations!

Statistics: Posted by KirkWard — October 27th, 2010, 8:10 pm


]]>