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.

Paypal is Creating the same INVOICE#

Home Forums Community Forum Paypal is Creating the same INVOICE#

This topic contains 5 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 9 months ago.

Topic Author Topic
Posted: Tuesday Apr 3rd, 2012 at 7:29 pm #9999
Colten Fry
Username: coltenfry

I installed the s2member plugin a couple weeks ago and everything seemed to be working fine until now… I have been on the phone with paypal for hours and they came to the conclusion that it is in the hidden fields during button creation.

So the problem is ALL transactions are creating the same invoice id See Below:

and when I get a new subscriber trying to sign up… it will not change that invoice number and paypal gets a error. “transaction can not be completed”

When i create a new button everything works fine for about an hour and it creates a unique invoice. but then it get stuck again and i cannot figure out the problem.

Can anyone PLEASE help

  • This topic was modified 4 years, 9 months ago by  Colten Fry.

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Wednesday Apr 4th, 2012 at 2:39 pm #10053
Raam Dev
Username: Raam
Staff Member

Hi Colten,

Could you please share the button code you’re using?

Are you using the HTML code version of the button instead of the shortcode version? If so, can you please confirm that you’re using a PHP plugin such as Exec-PHP?

Posted: Wednesday Apr 4th, 2012 at 4:23 pm #10085
Colten Fry
Username: coltenfry

Raam thank you.

I am using the short code below.

[s2Member-PayPal-Button level="2" ccaps="" desc="1 week Trial/  We look forward to seeing you in our trade room and classes LIVE for the next week!" ps="" lc="" cc="USD" dg="0" ns="1" custom="www.eminitactics.com" ta="0" tp="1" tt="W" ra="249.95" rp="1" rt="M" rr="1" rrt="" rra="1" success="http://www.eminitactics.com/wp-login.php?action=register/" image="http://www.eminitactics.com/wp-content/uploads/2012/03/signupgoldwithoutcc1.png" output="button" /]

I also am using the “PHP execution” plugin by Nicolas Zeh

Thank you

Posted: Thursday Apr 5th, 2012 at 3:03 am #10124

That’s odd. You can see the button’s template in this file s2member[hilite mono]/includes/templates/buttons/paypal-checkout-button.php[/hilite].

In it you’ll see that the unique invoice ID/code is generated with [hilite code]S2MEMBER_VALUE_FOR_PP_INV()[/hilite]. You can find that function in this file: [hilite mono]s2member/includes/functions/api-functions.inc.php[/hilite].

[hilite pre_code]
function s2member_value_for_pp_inv ()
{
return uniqid () . "~" . $_SERVER["REMOTE_ADDR"];
}
[/hilite]

uniqid is a PHP function that shouldn’t be outputing the same value. http://php.net/manual/en/function.uniqid.php

I’m suspecting this is a caching problem.

By the way, you may want to turn on button encryption. [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Encryption[/hilite]

I hope that helps. :)

Posted: Thursday Apr 5th, 2012 at 10:27 am #10149
Colten Fry
Username: coltenfry

I actually turned of the encryption function to see if that would fix the problem, it didnt.

I was also suspecting a cache problem…. i was using wp super cache… i disabled it and cleared the cache. is there anything else you can think that may solve this problem?

Posted: Thursday Apr 5th, 2012 at 12:48 pm #10165

OK. Now just run a few test purchases to see how it goes without the caching on for that page, please.

Keep logging enabled so we get more data from them, too. [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Logging[/hilite]

Viewing 5 replies - 1 through 5 (of 5 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.