latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Custom pay pal subscription button Huh

Home Forums Community Forum Custom pay pal subscription button Huh

This topic contains 25 replies, has 2 voices. Last updated by  webboy webboy 4 years, 6 months ago.

Topic Author Topic
Posted: Monday May 14th, 2012 at 11:44 am #13401
webboy webboy
Username: webboy

Hi all, Just a quick question we have a custom pay pal subscription button ,

The s2member system works ok if create a subscription button from within s2member

but if we make a custom subscription button and check out it dose not display the screen for the user to create the account after successful payment or even create a login.

, any ideas on what i have to do to get s2member to create the WordPress user account ?

Here is my button that works , what is missing ? as i have compared both

(I am logged out of admin and the payment button is not a protected also the pages is within the blog and clear the cookies are clear)

<input type="hidden" name="invoice" value="” />
<input type="hidden" name="on0" value="” />
<input type="hidden" name="os1" value="” />
<input type="hidden" name="on1" value="” />
<input type="hidden" name="os1" value="” />

<input type="hidden" name="p1" value="”>

List Of Topic Replies

Viewing 25 replies - 1 through 25 (of 25 total)
Author Replies
Author Replies
Posted: Tuesday May 15th, 2012 at 6:39 am #13497

Hi webboy.

Sorry, the code didn’t come through right. You need to post it between [hilite mono]<code>[/hilite] tags. It’s better to use the shortcode, though, because then the button can be encrypted.

I’m not sure I understood what the problem is. You have the button and it works fine, the person goes pay to PayPal and then comes back but can’t register?

Posted: Tuesday May 15th, 2012 at 6:58 am #13502
webboy webboy
Username: webboy
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="xxxx@gmail.com">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="notify_url"  value="http://xxxx.com/?s2member_paypal_notify=1" />
<input type="hidden" name="cancel_return" value="http://xxxx.com">
<input type="hidden" name="return" value="http://xxxx.com/?s2member_paypal_return=1">
 <input type="hidden" name="rm" value="2" />
 <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="http://xxxx.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="xx">
<input type="hidden" name="item_number" value="0056">
 <input type="hidden" name="invoice" value="<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>" />
<input type="hidden" name="on0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>" />
<input type="hidden" name="os1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>" />
 <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; ?>" />
<input type="hidden" name="image_url"
value="http://xxxx.com.jpg">
 <input type="hidden" name="modify" value="0" />
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
<input type="hidden" name="a1" value="0.01">
<input type="hidden" name="p1" value="<? echo $how_nmany_days_in_the_month ?>">
<input type="hidden" name="t1" value="D">
<input type="hidden" name="a3" value="0.01">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">

<input type="image" src="http://www.paypal.com/en_US/i/btn/btn_subscribe_LG.gif" border="0" name="submit"
alt="Make payments with PayPal - it’s fast, free and secure!">
</form>
Posted: Tuesday May 15th, 2012 at 7:12 am #13505

Thanks, webboy.

So you’re using that button, do you have a PHP execution plugin installed? Otherwise the PHP in that button’s code won’t work.

And what exactly is the problem? I’m not sure from the first post. Are users checking out successfully but then not being able to register in your site? Are they not being allowed to register or they aren’t taken to the registration page?

Make sure you have logging enabled, so we can get more data from the transactions to help determine the problem, please. [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Logging[/hilite]

Posted: Tuesday May 15th, 2012 at 7:26 am #13508
webboy webboy
Username: webboy

The code is with in a WordPress template file.

The problem is that the account is not created after a successfully transaction (eg dose not display the account creation form);

i have tested this with a s2member subscription button that works ok

so there must be a discrepancy with the above code

Posted: Tuesday May 15th, 2012 at 4:45 pm #13549

That code works fine, haven’t had reports that say otherwise. I suggest that you re-upload that file from your zip.

What are you having problems with, if the subscription button is working fine? A buy-now one? Could you post the shortcode you’re using?

Do you have logging enabled to see what happens after checkout? I want to see if s2Member is logging any errors that would prevent the person from registering. [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Logging[/hilite]

Posted: Tuesday May 15th, 2012 at 5:29 pm #13550
webboy webboy
Username: webboy

ok creating one now , to see what the problem is

The Message reads

Thank you! ( you MUST check your email before proceeding ).

* Note: It can take ( up to 15 minutes ) for Email Confirmation with important details. If you don’t receive email confirmation in the next 15 minutes, please contact Support.

http://xxx.com /?s2member_paypal_return=1

PHP v5.3.10 ::
WordPress® v3.3.1 ::
s2Member® v120309
Memory 19.70 MB ::
Real Memory 20.00 MB :: Peak Memory 19.84 MB
:: Real Peak Memory 20.00 MB

domian.com/samplegenie/?s2member_paypal_return=1

User-Agent: Mozilla/5.0 (Windows NT 5.2; rv:12.0) Gecko/20100101 Firefox/12.0

array (
‘subscr_gateway’ => ‘paypal’,
‘s2member_log’ =>
array (
0 =>
‘No Return-Data. Customer must wait for Email Confirmation.’,

1 => ‘Redirecting Customer to the Home Page.
Customer must wait for Email Confirmation.’,

2 => ‘Note. This can sometimes happen when/if you are offering a free Trial Period.
There are times when a Payment Gateway will NOT supply s2Member with any data immediately after checkout.
When/if this happens, s2Member must process the transaction via IPN only
( i.e. behind-the-scene ), and the Customer must wait for Email Confirmation in these cases.’,

(we want to do this
make a person pay up until the 1st of the mount then everybody starts on the 1 of the month)

Arrr Huh

hence the code

<input type="hidden" name="p1" value="<? echo $how_nmany_days_in_the_month ?>">
3 => 'array (
 \'s2member_paypal_return\' => \'1\',
 \'txn_type\' => \'subscr_signup\',

 \'subscr_id\' => \'I-W5853LVR3HE7\',

 \'last_name\' => \'xxx\',
 \'option_selection1\' => \'\',

 \'option_selection2\' => \'xx.xx.xx.xxx\',
 \'residence_country\' 
=> \'Gxx\',
 \'mc_currency\' => \'USD\',
 \'item_name\' => \'xxxxx\',
 \'amount1\' => \'0.01\',
 \'business\
' => \'xxx.com\',
 \'amount3\' => \'0.01\',
 \'recurring\' => \'1\',
 \'payer_status\' => \'verified\',
 \
'payer_email\' => \'xxx.xom\',
 \'first_name\' => \'ccc\',
 \'receiver_email\' => \'ccccc\',
 \'payer_id\' => 
\'F2Sxxx\',
 \'option_name1\' => \'Originating Domain\',
 \'invoice\' => \'4fb2c7c772653~xxxxx\',
 \'
option_name2\' => \'Customer IP Address\',
 \'reattempt\' => \'1\',
 \'item_number\' => \'0056\',
 
\'subscr_date\' => \'14:17:46 May 15, 2012 PDT\',
 \'custom\' => \'xxxxxk\',
 \'charset\'
=> \'windows-1252\',
 \'period1\' => \'16 D\',
 \'mc_amount1\' => \'0.01\',
 \'period3\' => \'1 M\',
 \
'mc_amount3\' => \'0.01\',
 \'auth\' => \'xxxxxH-X3CcPg7v_7xdo3ig59KegyIEu_KbFFimXexsy4j1OL47IbMKflrb9KefT_s
tac7wa1MS8g3v0hx1_M6DOpYVNWNBL4oqavCmwjlDMZj7VeeIvWE78z1ISwid3JXiYUbRzpoDg-hVmXMN8qfzywqDE0MO
sLJyJIEpLsKHqd0FMm0TECsyjbUQmH_ojJdn7m_lBhXjEbJXIC\',
 \'form_charset\' => \'UTF-8\',
)',
 ),
)
Posted: Tuesday May 15th, 2012 at 5:34 pm #13553

I see. Well, the log si quite clear about the reason. This is a problem with PayPal, really, there isn’t much we can do about it.

Since s2Member doesn’t have the info yet, it has to wait until later to get it and then send the confirmation email with the registration link for the user.

If you enter an amount, even 1 cent, for the initial term, then it may solve it. What’s your shortcode?

Posted: Tuesday May 15th, 2012 at 5:55 pm #13556
webboy webboy
Username: webboy

no this is a custom html / php form, is there any way can i get his going

i dont use the short code as i have modified the trial period to count down to the end of the month

is there any other way i can produce this as i have never seen this work by me waiting for the email to arrive from s2memeber

If you enter an amount, even 1 cent, for the initial term, then it may solve it. What’s your shortcode? (i have it at 1c)
\’amount1\’ => \’0.01\’, <<

Posted: Tuesday May 15th, 2012 at 6:10 pm #13558

I see. Well, you can adjust the initial term in the shortcode too. http://www.primothemes.com/forums/viewtopic.php?f=36&t=1604

If you never got the emails, I’d test it removing the trial/initial term and doing a 1 cent buy-now to see if you get the confirmation email then. If not, you have a problem there that needs fixing too. Knowledge Base » Troubleshooting Email Delivery Problems

I hope that helps!

Posted: Tuesday May 15th, 2012 at 10:43 pm #13597
webboy webboy
Username: webboy

Hi

I see the problem between two
with the short code you encrypted the paypal_return path hence why it accepts the user registrations immediately and with the HTML code it fail

xxx/?s2member_paypal_return=1&s2member_paypal_return_tra=fnIyOlFSa3pPUG1obVlmc1NMTDZNNGpheGJZd1R5dThOYW9yOmZhYjZjYTA5MTZjNzhiZTdiMjJmOWI2ODVhZWUzNTVlfDFgTAgRpZs2mVW4cgGSiDgbWVkHkfA4Zom88YNmk8mtztIcAZB1lj9i64c6fwkj_eX9t4NWwAAYspMllwj5WUYMWIRPwI2NTf1wV8IkcVy_7UTsbMJg-EW4_DMw6L0ZV0qzcJoC5wrBR09sH_DPo9AWFVY1a22sJV57KigawFXHoJ4s9jTQeloUYNQICir9mmTrgC4NjisY89oV_cugvdpccraf8I2Fcci-dLlT4bcOzJIn5etZ8UQjTRg5pxZpCEfgbdsDsbfeFekJ2iWN4NJi6XLY0YZWiXy2acBebN3TneHXZBJ0mQiJMOLWwrs607tZ-YwHqbWrscxJCDujb61_aZHWiWnG-etsoBSwB6WYJKm1m0cs9neIWQKBAWK6Cw

is there a way i can call the return path encrypted vir php

Posted: Wednesday May 16th, 2012 at 12:24 am #13609

You can see the return URL here: [hilite path]Dashboard -› s2Member® -› PayPal® Options -› PayPal® PDT/Auto-Return Integration[/hilite]

In the button’s template, you can see the hidden input for it too:

[hilite pre_code]

[/hilite]

I hope that helps.

Posted: Wednesday May 16th, 2012 at 12:30 am #13610
webboy webboy
Username: webboy

What the function call to generate encrypted code below as the html dose not

xxx/?s2member_paypal_return=1&s2member_paypal_return_tra=fnIyOlFSa3pPUG1obVlmc1NMTDZNNGpheGJZd1R5dThOYW9yOmZhYjZjYTA5MTZjNzhiZTdiMjJmOWI2ODVhZWUzNTVlfDFgTAgRpZs2mVW4cgGSiDgbWVkHkfA4Zom88YNmk8mtztIcAZB1lj9i64c6fwkj_eX9t4NWwAAYspMllwj5WUYMWIRPwI2NTf1wV8IkcVy_7UTsbMJg-EW4_DMw6L0ZV0qzcJoC5wrBR09sH_DPo9AWFVY1a22sJV57KigawFXHoJ4s9jTQeloUYNQICir9mmTrgC4NjisY89oV_cugvdpccraf8I2Fcci-dLlT4bcOzJIn5etZ8UQjTRg5pxZpCEfgbdsDsbfeFekJ2iWN4NJi6XLY0YZWiXy2acBebN3TneHXZBJ0mQiJMOLWwrs607tZ-YwHqbWrscxJCDujb61_aZHWiWnG-etsoBSwB6WYJKm1m0cs9neIWQKBAWK6Cw
Posted: Wednesday May 16th, 2012 at 12:38 am #13612

I just ran a search for [hilite mono]s2member_paypal_return_tra[/hilite] in the files. Look at line 222 in [hilite mono]s2member/includes/classes/sc-paypal-button-in.inc.php[/hilite].

Posted: Wednesday May 16th, 2012 at 1:29 am #13623
webboy webboy
Username: webboy
Posted: Thursday May 17th, 2012 at 1:12 am #13725
webboy webboy
Username: webboy

Hi Cristián, ok i manged to get the encryption working by using the short code but i need the trial date work using my php code (this just calculates how many days to the end of the month)

[s2Member-PayPal-Button
level="1" 
ccaps="" 
desc="Bronze Member / description and pricing details here." 
ps="paypal" 
lc="" 
cc="GBP" 
dg="0" 
ns="1" 
custom="x.com" 
ta="0.01" 
tp="<?php $z = date('t',gmdate('Y-m-d')) - gmdate('d'); echo $z; ?>" 
tt="D" 
ra="0.01" 
rp="1" 
rt="M" 
rr="1" 
rrt="" 
rra="1" 
image="default" 
output="button" /]
Posted: Thursday May 17th, 2012 at 3:17 am #13730

Have you tried this?

[hilite code]tp=""[/hilite]
Posted: Thursday May 17th, 2012 at 9:10 am #13768
webboy webboy
Username: webboy

not working

i see this (below)

This should start on the 1st month also i dont dont see the trial period

Payments start: 17 May 2012
Next payment due: 17 Jun 2012
Next payment amount: $0.01 USD

  • This reply was modified 4 years, 7 months ago by  webboy webboy.
Posted: Thursday May 17th, 2012 at 4:54 pm #13805

Could you post your shortcode with the PHP?

I tried that PHP just now and it outputs 14, so it works fine.

Posted: Thursday May 17th, 2012 at 5:35 pm #13809
webboy webboy
Username: webboy

please post your result forum

and also the HTML output displaying the numeric value

Posted: Thursday May 17th, 2012 at 6:20 pm #13814
webboy webboy
Username: webboy

ok see this this supposed to put the value of 17 in the description (see below and i dont see any thing …)

[s2Member-PayPal-Button
level="1"
ccaps=""
desc="Bronze Member / description and pricing details here."
ps="paypal"
lc=""
cc="GBP"
dg="0"
ns="1"
custom="x.om"
ta="0.01"
tp=""
tt="D"
ra="0.01"
rp="1"
rt="M"
rr="1"
rrt=""
rra="1"
image="default"
output="button" /]

Description Terms Amount
Bronze Member
Referencing Customer ID: 2
Customer IP Address: xxx
$0.01 USD for each month $0.01 USD

Posted: Thursday May 17th, 2012 at 9:16 pm #13834
webboy webboy
Username: webboy

Bug Bug Bug

Trial period dose not work and you can have more than 7 Days for a Trial period (that’s your bug)

I unencrypted the info to see what you was passing and managed to hack the HTML vars for the paypal payment to pass the correct info

x,com?s2member_paypal_return=1
&amp;s2member_paypal_return_tra%5Bta%5D=0
&amp;s2member_paypal_return_tra%5Btp%5D=0  <<<<<<< 0 when the value was set 7 (NOT WORKING)
&amp;s2member_paypal_return_tra%5Btt%5D=D
&amp;s2member_paypal_return_tra%5Bra%5D=0.01
&amp;s2member_paypal_return_tra%5Brp%5D=1
&amp;s2member_paypal_return_tra%5Brt%5D=M
&amp;s2member_paypal_return_tra%5Brr%5D=1
&amp;s2member_paypal_return_tra%5Brrt%5D
&amp;s2member_paypal_return_tra%5Brra%5D=1
&amp;s2member_paypal_return_tra%5Binvoice%5D=4fb58e080185f~86.5.209.143
&amp;s2member_paypal_return_tra%5Bchecksum%5D=178f0ec46901478da2ed4fe02bfe45d4
[s2Member-PayPal-Button level="1" ccaps="" desc="Bronze Member xx" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="x.com" ta="0.01" tp="8" tt="D" ra="0.01" rp="1" rt="M" rr="1" rrt="" rra="1" image="default" output="button" /]

TP ignored in the array and my I inserted the php value from the calc date ito pass to pay pal

Problem solved and i hope you have this fixed on the next update … thanks for the help Cristián keep up the good work…

Posted: Friday May 18th, 2012 at 12:19 am #13840

What version of s2Member are you using? The trial/initial term limits for the PayPal buttoms have recently been updated in the release 120514.

(s2Member Framework) PayPal® Buttons. Restrictions limiting the number of days/weeks/months/years allowed in recurring periods for a PayPal® Button have been increased. Max days was increased from 7 to 90, weeks remains at 52 max, months is up from 12 to 24 max; years increased from 1, up to 5 years max.

So this shortcode should be fine for your need:

[[s2Member-PayPal-Button level="1" ccaps="" desc="Bronze Member / description and pricing details here." ps="paypal" lc="" cc="GBP" dg="0" ns="1" custom="x.om" ta="0.01" tp="<?php echo (date('t') - date('j')); ?>" tt="D" ra="0.01" rp="1" rt="M" rr="1" rrt="" rra="1" image="default" output="button" /]]
Posted: Friday May 18th, 2012 at 12:22 am #13841
webboy webboy
Username: webboy

ahhh ha

Version 120309

so would that of fixed the the problem

  • This reply was modified 4 years, 7 months ago by  webboy webboy.
Posted: Friday May 18th, 2012 at 5:21 am #13848

Yeah. Please update to the latest release. :)

Posted: Tuesday Jun 19th, 2012 at 1:34 am #16823
webboy webboy
Username: webboy

Hi Cristián,

For the ability add PHP in the short codes is this only available in the pro versions as its just echoing the text and not parsing the the code.

Viewing 25 replies - 1 through 25 (of 25 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.