News:

Wondering if this will always be free?  See why free is better.

Main Menu

Another paid subscriptions bug?

Started by Krashsite, May 24, 2012, 12:56:41 AM

Previous topic - Next topic

Sir Osis of Liver



<sigh> Posted the original code wrong, but hack was correct.  Attached should be good.
"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

Wazza

Just ran in the test site if you want to look at the error log

Wazza


QuoteUnknown Paid Subscriptions transaction type.
txn_type: subscr_signup
subscr_id: I-5PD4V57CDU1S
last_name: Wazza
residence_country: AU
mc_currency: AUD
item_name: Try Again Subscription
business: [email protected]
recurring: 1
verify_sign: AQPPHRijwPigCZ-gJGYn5U5MSzblANEdfdWpAQ0QS4ENDFjO3wmDO7pS
payer_status: unverified
payer_email: Wazza
first_name: Wazza
receiver_email: [email protected]
payer_id: AYZ5QYZ4P53ZY
reattempt: 1
item_number: 1+2
subscr_date: 19:50:19 May 28, 2012 PDT
charset: windows-1252
notify_version: 3.4
period3: 1 D
mc_amount3: 0.10
ipn_track_id: c8c9a5a1ce3bc

Sir Osis of Liver


Krap.  Either I buggered up the boolean, or txn_type is checked somewhere else.

"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

Wazza

Don't bet yourself up on this one!

I think you have done real well finding and trying to fix the problem  ;)

Appreciate the effort.  :) ...Maybe if we leave it for a day, someone else may add some light to this? 


Sir Osis of Liver

"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

Wazza


Wazza

QuoteParse error: syntax error, unexpected '{' in /home/wazza/public_html/ATown/Sources/Subscriptions-PayPal.php on line 260

feline

Replace at line 258:

if (($_POST['txn_type'] == 'subscr_payment' || $_POST['txn_type'] == 'subscr_signup') && !empty($_POST['subscr_id'])


with:

if (($_POST['txn_type'] == 'subscr_payment' || $_POST['txn_type'] == 'subscr_signup') && !empty($_POST['subscr_id']))

Sir Osis of Liver


That's what I had previously.   Subscription didn't work, but didn't cause a parse error.  Something must be wrong with the boolean.



"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

Restor

Hi All,

I needed the paid feature as well and did have some spare time to look into the paypal code. Actualy the code is pretty good as far as i can see.

The issue on my install why payments did not work all was because in sandbox mode the curl test statement failed which resulted in a fallback to plain http (fsockopen) which is not really bad either btw. But the problem i uncoverred here is that the verify request is done with a non ssl request on port 80 to paypal which at least for me did not verify in the sandbox. After changing the curl test to fixed sandbox and SSL port 443 the verify works like a charm.

                if (function_exists('curl_init') && $curl = curl_init('https://www.sandbox.paypal.com/cgi-bin/webscr'))
                {
                        // Set the post data.
                        curl_setopt($curl, CURLOPT_POST, true);
                        curl_setopt($curl, CURLOPT_POSTFIELDSIZE, 0);
                        curl_setopt($curl, CURLOPT_POSTFIELDS, $requestString);

                        // Fetch the data returned as a string.
                        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

                        // Fetch the data.
                        $this->return_data = curl_exec($curl);

                        // Close the session.
                        curl_close($curl);
                }
                // Otherwise good old HTTP.


I did not feel like fixing the sandbox check for now, i am now testing signing up of subcriptions and recurring payments which both seems to work flawless now. And yes you do get some IPN's which are not used about the subcription, but that is because SMF does not actualy know about the existence of the recurring payment, it just adds the amount of payed time to you current payment which had the effect of extension like a recurring subcription. If you do not receive a payment it will automaticly stop the subscription as well.

I hope this helps a but in fixing this issue.

Regards,

Wazza

Hi Restor,

Welcome too! ...great first post  :)

I will add this to the test forum later today that Krash and I have been messing with and try.

Have you still been selecting 'Allow user to auto-renew this subscription' ? with this working?

Also have you tried a live payment, not in sandbox? we were testing live with a .10c payment set up

Thank you  ;)

taysan

FWIW I've had very little luck with auto renewing subscriptions.  Frankly even the initial subscription has been spotty in terms of confirming payment back from PayPal etc.

I'm constantly having to cross reference PayPal email addresses to my members to confirm who is subscribing but of course they aren't always the same.

At minimum having the Member Name show up in the payment transaction, as well as the bloody useless 'an error has occurred' email I get when it doesn't work (what use is getting an error message email with absolutely NO useful information in it?).

I've completely stopped promoting paid subscriptions largely because it's not worth the effort involved.

xPureEvilx

So is this topic dead? Iam using SMF 2.0.2 and cant seem to get Paid Subs working.

Arantor

I've never had a problem with paid subs to be honest... the big problem with this topic and similar ones is that too many people have never had a problem with it and can't reproduce it either in order to debug it.

Wazza

Problem hasn't gone away I've just stopped trying to get it fixed  :'(

In short if you're trying to use reoccurring payments your headed for 'BIG' problems.

I'm using non-reoccurring to fix the problem until a fix becomes available.

The funny thing is now I fully understand reoccurring payments even if this now gets fixed i will just stay with non-reoccurring payments.

This creates less anger from a member if they drift off, as they dont need to stop a reoccurring payment

:)   

live627

QuoteIn short if you're trying to use reoccurring payments your headed for 'BIG' problems
Oh! So that's why the recurring subscriber on my site last didn't get their group added.

Wazza

Quote from: live627 on July 12, 2012, 01:52:57 AM
QuoteIn short if you're trying to use reoccurring payments your headed for 'BIG' problems
Oh! So that's why the recurring subscriber on my site last didn't get their group added.


Yes this is what happend to me, plus I had error messages come via emial too  :(
Also this created errors in my site error log

madfiddler

Sorry to bump, but I've been complaining about this issue for years, and never had a resolve to it. I have the 2005 issue.

What's the latest now?

Thanks,

m

emanuele

Quote from: Krash. on May 24, 2012, 12:56:41 AM
When I do a test subscription with recurring payment, two 'Unknown transaction type' errors are generated. PayPal executes two transactions to set up the subscription:
When you say 'Unknown transaction type' you mean the $txt['paid_unknown_transaction_type'] = 'Unknown Paid Subscriptions transaction type.';
asking for confirmation, because that error is triggered in case the gateway cannot handle the payment at all.

I tested the recurring subscriptions in few currencies (USD, EUR, AUD) and when properly configured the aypal account to accept payment in other currencies worked without an issue.

Now I have to wait a couple of days to see if the recurring payment is accepted and processed properly.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Advertisement: