Community Support Forums — WordPress® ( Users Helping Users ) — 2012-01-02T21:13:03-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=16566 2012-01-02T21:13:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16566&p=59469#p59469 <![CDATA[Re: Button Code Generator For Level #1 Access]]> Glad to hear it's working now. Let us know if you have any other questions.

Statistics: Posted by Raam Dev — January 2nd, 2012, 9:13 pm


]]>
2012-01-02T18:10:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16566&p=59458#p59458 <![CDATA[Re: Button Code Generator For Level #1 Access]]> Thank you so much! It's working like a charm!

Statistics: Posted by mireille — January 2nd, 2012, 6:10 pm


]]>
2012-01-02T17:56:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16566&p=59455#p59455 <![CDATA[Re: Button Code Generator For Level #1 Access]]>
Code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="raam@example.com" />
<input type="hidden" name="cmd" value="_xclick" />
<!-- Instant Payment Notification & Return Page Details -->
<input type="hidden" name="notify_url" value="http://example.websharks-inc.com/wordpress/?s2member_paypal_notify=1" />
<input type="hidden" name="cancel_return" value="http://example.websharks-inc.com/wordpress/" />
<input type="hidden" name="return" value="http://example.websharks-inc.com/wordpress/?s2member_paypal_return=1" />
<input type="hidden" name="rm" value="2" />
<!-- Configures Basic Checkout Fields -->
<input type="hidden" name="lc" value="" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="custom" value="example.websharks-inc.com" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="page_style" value="paypal" />
<input type="hidden" name="charset" value="utf-8" />
<input type="hidden" name="item_name" value="VIP Access" />
<input type="hidden" name="item_number" value="1" />
<!-- Configures s2Member's Unique Invoice ID/Code  -->
<input type="hidden" name="invoice" value="<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>" />
<!-- Identifies/Updates An Existing User/Member ( when/if applicable )  -->
<input type="hidden" name="on0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>" />
<input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
<!-- Identifies The Customer's IP Address For Tracking -->
<input type="hidden" name="on1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>" />
<input type="hidden" name="os1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>" />
<!-- Controls Modify Behavior At PayPal® Checkout -->
<input type="hidden" name="modify" value="0" />
<!-- Customizes Prices, Payments & Billing Cycle -->
<input type="hidden" name="amount" value="5" />
<!--<input type="hidden" name="src" value="BN" />-->
<!--<input type="hidden" name="srt" value="" />-->
<!--<input type="hidden" name="sra" value="1" />-->
<!--<input type="hidden" name="a1" value="0" />-->
<!--<input type="hidden" name="p1" value="0" />-->
<!--<input type="hidden" name="t1" value="D" />-->
<!--<input type="hidden" name="a3" value="5" />-->
<!--<input type="hidden" name="p3" value="1" />-->
<!--<input type="hidden" name="t3" value="L" />-->
<!-- Displays The PayPal® Image Button -->
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
</form>


Notice all the commented out input lines that start with <!-- and end with -->? Since they're commented out, you can (and should) ignore those.

In your original code, you had an 'amount' field AND an 'a3' field active. With this button code, you should only have the 'amount' field (since the 'a3' field is commented out).

So to make things clearer, here's the same code as above, except with the commented input lines removed:

Code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="raam@example.com" />
<input type="hidden" name="cmd" value="_xclick" />
<!-- Instant Payment Notification & Return Page Details -->
<input type="hidden" name="notify_url" value="http://example.websharks-inc.com/wordpress/?s2member_paypal_notify=1" />
<input type="hidden" name="cancel_return" value="http://example.websharks-inc.com/wordpress/" />
<input type="hidden" name="return" value="http://example.websharks-inc.com/wordpress/?s2member_paypal_return=1" />
<input type="hidden" name="rm" value="2" />
<!-- Configures Basic Checkout Fields -->
<input type="hidden" name="lc" value="" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="custom" value="example.websharks-inc.com" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="page_style" value="paypal" />
<input type="hidden" name="charset" value="utf-8" />
<input type="hidden" name="item_name" value="VIP Access" />
<input type="hidden" name="item_number" value="1" />
<!-- Configures s2Member's Unique Invoice ID/Code  -->
<input type="hidden" name="invoice" value="<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>" />
<!-- Identifies/Updates An Existing User/Member ( when/if applicable )  -->
<input type="hidden" name="on0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>" />
<input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
<!-- Identifies The Customer's IP Address For Tracking -->
<input type="hidden" name="on1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>" />
<input type="hidden" name="os1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>" />
<!-- Controls Modify Behavior At PayPal® Checkout -->
<input type="hidden" name="modify" value="0" />
<!-- Customizes Prices, Payments & Billing Cycle -->
<input type="hidden" name="amount" value="5" />
<!-- Displays The PayPal® Image Button -->
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
</form>


And finally, the same code with the 'amount' field made editable:

Code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="raam@example.com" />
<input type="hidden" name="cmd" value="_xclick" />
<!-- Instant Payment Notification & Return Page Details -->
<input type="hidden" name="notify_url" value="http://example.websharks-inc.com/wordpress/?s2member_paypal_notify=1" />
<input type="hidden" name="cancel_return" value="http://example.websharks-inc.com/wordpress/" />
<input type="hidden" name="return" value="http://example.websharks-inc.com/wordpress/?s2member_paypal_return=1" />
<input type="hidden" name="rm" value="2" />
<!-- Configures Basic Checkout Fields -->
<input type="hidden" name="lc" value="" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="custom" value="example.websharks-inc.com" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="page_style" value="paypal" />
<input type="hidden" name="charset" value="utf-8" />
<input type="hidden" name="item_name" value="VIP Access" />
<input type="hidden" name="item_number" value="1" />
<!-- Configures s2Member's Unique Invoice ID/Code  -->
<input type="hidden" name="invoice" value="<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>" />
<!-- Identifies/Updates An Existing User/Member ( when/if applicable )  -->
<input type="hidden" name="on0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>" />
<input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
<!-- Identifies The Customer's IP Address For Tracking -->
<input type="hidden" name="on1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>" />
<input type="hidden" name="os1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>" />
<!-- Controls Modify Behavior At PayPal® Checkout -->
<input type="hidden" name="modify" value="0" />
<!-- Customizes Prices, Payments & Billing Cycle -->
<input type="text" name="amount" value="5" />
<!-- Displays The PayPal® Image Button -->
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
</form>


Try that... does that fix it for you?

Statistics: Posted by Raam Dev — January 2nd, 2012, 5:56 pm


]]>
2012-01-02T17:35:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16566&p=59453#p59453 <![CDATA[Re: Button Code Generator For Level #1 Access]]>
Image

Statistics: Posted by mireille — January 2nd, 2012, 5:35 pm


]]>
2012-01-02T17:27:47-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16566&p=59452#p59452 <![CDATA[Re: Button Code Generator For Level #1 Access]]> Statistics: Posted by Raam Dev — January 2nd, 2012, 5:27 pm


]]>
2012-01-02T17:23:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16566&p=59450#p59450 <![CDATA[Re: Button Code Generator For Level #1 Access]]>
Code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="raam@raamdev.com" />
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<!-- Instant Payment Notification & Return Page Details -->
<input type="hidden" name="notify_url" value="http://example.com/wordpress/?s2member_paypal_notify=1" />
<input type="hidden" name="cancel_return" value="http://example.com/wordpress/" />
<input type="hidden" name="return" value="http://example.com/wordpress/?s2member_paypal_return=1" />
<input type="hidden" name="rm" value="2" />
<!-- Configures Basic Checkout Fields -->
<input type="hidden" name="lc" value="" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="custom" value="www.newjlpt.com" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="page_style" value="paypal" />
<input type="hidden" name="charset" value="utf-8" />
<input type="hidden" name="item_name" value="VIP Access" />
<input type="hidden" name="item_number" value="1" />
<!-- Configures s2Member's Unique Invoice ID/Code  -->
<input type="hidden" name="invoice" value="<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>" />
<!-- Identifies/Updates An Existing User/Member ( when/if applicable )  -->
<input type="hidden" name="on0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>" />
<input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
<!-- Identifies The Customer's IP Address For Tracking -->
<input type="hidden" name="on1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>" />
<input type="hidden" name="os1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>" />
<!-- Controls Modify Behavior At PayPal® Checkout -->
<input type="hidden" name="modify" value="0" />
<!-- Customizes Prices, Payments & Billing Cycle -->
<input type="hidden" name="amount" value="5" />
<input type="hidden" name="src" value="BN" />
<input type="hidden" name="srt" value="" />
<input type="hidden" name="sra" value="1" />
<input type="hidden" name="a1" value="0" />
<input type="hidden" name="p1" value="0" />
<input type="hidden" name="t1" value="D" />
<input type="text" name="a3" value="5" />
<input type="hidden" name="p3" value="1" />
<input type="hidden" name="t3" value="L" />
<!-- Displays The PayPal® Image Button -->
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
</form>

Statistics: Posted by mireille — January 2nd, 2012, 5:23 pm


]]>
2012-01-02T17:17:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16566&p=59448#p59448 <![CDATA[Re: Button Code Generator For Level #1 Access]]> Statistics: Posted by Raam Dev — January 2nd, 2012, 5:17 pm


]]>
2012-01-01T18:21:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16566&p=59394#p59394 <![CDATA[Re: Button Code Generator For Level #1 Access]]> I tested the code on the page and it looks wonderful, but when I alter the amount in the "preview page" just before clicking on the button and be forwarded to PayPal’s website, PayPal still thinks it $5.
See screenshot below.

Image

Statistics: Posted by mireille — January 1st, 2012, 6:21 pm


]]>
2012-01-01T17:09:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16566&p=59391#p59391 <![CDATA[Re: Button Code Generator For Level #1 Access]]>
Code:
<input type="text" name="a3" value="5.00" />


If you're still having trouble, can you paste your button code here?

Statistics: Posted by Raam Dev — January 1st, 2012, 5:09 pm


]]>
2011-12-30T20:13:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16566&p=59278#p59278 <![CDATA[Re: Button Code Generator For Level #1 Access]]>
The first one worked like a charm. I prefer the second one though, because it looks much more awesome on the website itself. However, there was just one problem.
When I altered the amount from 5.00 to 7.00 and then clicked on the button, Paypal still displayed $5 during checkout.

Statistics: Posted by mireille — December 30th, 2011, 8:13 pm


]]>
2011-12-28T22:23:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16566&p=59040#p59040 <![CDATA[Re: Button Code Generator For Level #1 Access]]>
There are two possible ways to achieve this. The first way is to dynamically generate the price in the shortcode. See this thread for more information: viewtopic.php?f=36&t=1604

The other way is to use an unencrypted button and simply turn the hidden amount field into a text field that allows the user to set the price.

When you generate the PayPal button in s2Member, you'll see that you have two options: use the shortcode or use the PayPal Button Code that appears in the box at the bottom. (Keep in mind that you'll need to install and activate the PHP Execution plugin for this method to work because the PayPal Button Code contains some PHP.)

You can copy that PayPal Button Code, paste it into a WordPress page, and then modify it slightly to show a text field for the amount instead of hiding it. You'll change this line:

Code:
<input type="hidden" name="a3" value="5.00" />


to this

Code:
<input type="text" name="a3" value="5.00" />


(Note that if you're using a Buy Now button instead of a subscription button, you'll want to change the input field named "amount" instead of the one called "a3". Also, if you have trouble getting the text field to show up, try deleting all the lines in the generated form code that start and end with <!-- -->.)

Here's an example of what the full modified button code might look like for a Level 1 Subscription pay-what-you-want button:

Code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
 <input type="hidden" name="business" value="raam@raamdev.com" />
 <input type="hidden" name="cmd" value="_xclick-subscriptions" />
 <!-- Instant Payment Notification & Return Page Details -->
 <input type="hidden" name="notify_url" value="http://example.com/wordpress/?s2member_paypal_notify=1" />
 <input type="hidden" name="cancel_return" value="http://example.com/wordpress/" />
 <input type="hidden" name="return" value="http://example.com/wordpress/?s2member_paypal_return=1" />
 <input type="hidden" name="rm" value="2" />
 <!-- Configures Basic Checkout Fields -->
 <input type="hidden" name="lc" value="" />
 <input type="hidden" name="no_shipping" value="1" />
 <input type="hidden" name="no_note" value="1" />
 <input type="hidden" name="custom" value="example.com" />
 <input type="hidden" name="currency_code" value="USD" />
 <input type="hidden" name="page_style" value="paypal" />
 <input type="hidden" name="charset" value="utf-8" />
 <input type="hidden" name="item_name" value="Bronze Member / description and pricing details here." />
 <input type="hidden" name="item_number" value="1" />
 <!-- Configures s2Member's Unique Invoice ID/Code  -->
 <input type="hidden" name="invoice" value="<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>" />
 <!-- Identifies/Updates An Existing User/Member ( when/if applicable )  -->
 <input type="hidden" name="on0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>" />
 <input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
 <!-- Identifies The Customer's IP Address For Tracking -->
 <input type="hidden" name="on1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>" />
 <input type="hidden" name="os1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>" />
 <!-- Controls Modify Behavior At PayPal® Checkout -->
 <input type="hidden" name="modify" value="0" />
 <!-- Customizes Prices, Payments & Billing Cycle -->
 <input type="hidden" name="src" value="1" />
 <input type="hidden" name="srt" value="" />
 <input type="hidden" name="sra" value="1" />
 <input type="text" name="a3" value="5.00" />
 <input type="hidden" name="p3" value="1" />
 <input type="hidden" name="t3" value="M" />
 <!-- Displays The PayPal® Image Button -->
 <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
</form>


The above code generated the following text field + PayPal button on my test site:

Screen shot 2011-12-28 at 22.14.48 .png

Statistics: Posted by Raam Dev — December 28th, 2011, 10:23 pm


]]>
2011-12-27T16:34:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16566&p=58963#p58963 <![CDATA[Re: Button Code Generator For Level #1 Access]]> - Yes, that's right.

...will this option be limited to logged-in (i.e. registered) users
- That would be preferable, yes.

Statistics: Posted by mireille — December 27th, 2011, 4:34 pm


]]>
2011-12-27T16:29:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16566&p=58962#p58962 <![CDATA[Re: Button Code Generator For Level #1 Access]]>
Let me make sure I understand what you want to do: You'd like to offer something to your customers under a pay-what-you-want pricing model, correct? Will this option be limited to logged-in (i.e. registered) users, or will anyone be able to use this?

Statistics: Posted by Raam Dev — December 27th, 2011, 4:29 pm


]]>
2011-12-27T08:56:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16566&p=58923#p58923 <![CDATA[Button Code Generator For Level #1 Access]]> Statistics: Posted by mireille — December 27th, 2011, 8:56 am


]]>