Advertisement:

Author Topic: Subscriptions ....  (Read 21644 times)

Offline RFD

  • Jr. Member
  • **
  • Posts: 287
  • They're coming to take me away, hah hah ....
Subscriptions ....
« on: August 06, 2013, 06:26:29 PM »
... what's the deal with this smf subscription service, will it ever actually work correctly? 

i've got both premier and business pp accounts and if the "recurring payment" is clicked the transaction fails. 

why not just remove it until the smf and/or pp code actually works? 

i REALLY need a well functioning smf forum ......

Offline RFD

  • Jr. Member
  • **
  • Posts: 287
  • They're coming to take me away, hah hah ....
Re: Subscriptions ....
« Reply #1 on: August 08, 2013, 06:19:47 AM »
well, as a band-aid of sorts i edited the subscriptions php code (Sources sub-dir) and removed the offending "recurring payment" code. 

it's attached if anyone finds it useful.

could we get some kinda official response on smf subscriptions bug fixing, please?


Offline telcy

  • Semi-Newbie
  • *
  • Posts: 13
Re: Subscriptions ....
« Reply #2 on: August 08, 2013, 08:49:04 AM »
Why not disabling "Allow user to auto-renew this subscription" in your subscription plan?

It's easier then removing code.

Offline RFD

  • Jr. Member
  • **
  • Posts: 287
  • They're coming to take me away, hah hah ....
Re: Subscriptions ....
« Reply #3 on: August 08, 2013, 08:56:27 AM »
Why not disabling "Allow user to auto-renew this subscription" in your subscription plan?

It's easier then removing code.

because that would be too easy.  8)

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: Subscriptions ....
« Reply #4 on: August 08, 2013, 09:05:28 AM »
Last time I've seen a problem with recurring payments was because of the currency (see last paragraph).


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.

Offline RFD

  • Jr. Member
  • **
  • Posts: 287
  • They're coming to take me away, hah hah ....
Re: Subscriptions ....
« Reply #5 on: August 08, 2013, 09:13:36 AM »
don't see currency as an issue, i think it's something else ... ?

with the recurring payment option turned off, or the code for it commented out, it all works just fine.

Offline telcy

  • Semi-Newbie
  • *
  • Posts: 13
Re: Subscriptions ....
« Reply #6 on: August 08, 2013, 09:19:41 AM »
Why not disabling "Allow user to auto-renew this subscription" in your subscription plan?

It's easier then removing code.

because that would be too easy.  8)

:D that's right.

I've also noticed same problems with recurring payments.

With other words,..
If I enable recurring for users they can't buy a subscription. It's a long time ago where I disabled it.

So I will test it again on a seperated smf installation and try to fix the problem.

Offline RFD

  • Jr. Member
  • **
  • Posts: 287
  • They're coming to take me away, hah hah ....
Re: Subscriptions ....
« Reply #7 on: August 08, 2013, 09:40:21 AM »
Why not disabling "Allow user to auto-renew this subscription" in your subscription plan?

It's easier then removing code.

because that would be too easy.  8)

:D that's right.

I've also noticed same problems with recurring payments.

With other words,..
If I enable recurring for users they can't buy a subscription. It's a long time ago where I disabled it.

So I will test it again on a seperated smf installation and try to fix the problem.

that would be Awesome - much obliged for at least looking into this long standing problem.

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: Subscriptions ....
« Reply #8 on: August 08, 2013, 10:29:44 AM »
don't see currency as an issue, i think it's something else ... ?
So you have the paypal (in paypal I mean, not in SMF) setting set as I suggested in the other topic?


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.

Offline RFD

  • Jr. Member
  • **
  • Posts: 287
  • They're coming to take me away, hah hah ....
Re: Subscriptions ....
« Reply #9 on: August 08, 2013, 10:39:04 AM »
don't see currency as an issue, i think it's something else ... ?
So you have the paypal (in paypal I mean, not in SMF) setting set as I suggested in the other topic?

it's a pp business account, set up in USD - all payments are in USD as well, no other currencies or currency translations required.

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: Subscriptions ....
« Reply #10 on: August 08, 2013, 10:46:08 AM »
That's already a better answer.

Did you set up the return URL (IPN?) in paypal?
Some reports says that not setting it solves some issues.


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.

Offline RFD

  • Jr. Member
  • **
  • Posts: 287
  • They're coming to take me away, hah hah ....
Re: Subscriptions ....
« Reply #11 on: August 08, 2013, 11:11:21 AM »
That's already a better answer.

Did you set up the return URL (IPN?) in paypal?
Some reports says that not setting it solves some issues.

yep, done and tested with a real pp dollar transfer.

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: Subscriptions ....
« Reply #12 on: August 08, 2013, 02:46:02 PM »
And?... It didn't work?

Give a clear answer is much more effective and make life easier to both me and you. ;)
At the moment without further clarification I can't be sure if it worked or not, I can *assume* it didn't work because you didn't write something like "YAY! IT WORKED!!" but this is not very useful...


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.

Offline RFD

  • Jr. Member
  • **
  • Posts: 287
  • They're coming to take me away, hah hah ....
Re: Subscriptions ....
« Reply #13 on: August 08, 2013, 02:53:14 PM »
And?... It didn't work?

Give a clear answer is much more effective and make life easier to both me and you. ;)
At the moment without further clarification I can't be sure if it worked or not, I can *assume* it didn't work because you didn't write something like "YAY! IT WORKED!!" but this is not very useful...

parameters -

+ installed current smf version
+ have pp business account
+ pp account setup for subscription service
+ test subscription registration fails when "recurring subscription" is checked
+ test subscription registration is successful when "recurring subscription" is NOT checked
 
you want access to my forum for a hand's on?



Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,359
Re: Subscriptions ....
« Reply #14 on: August 08, 2013, 03:02:23 PM »

What is the error (in your error log) when recurring payment fails?

Is the transaction completed in your PayPal account?


Offline RFD

  • Jr. Member
  • **
  • Posts: 287
  • They're coming to take me away, hah hah ....
Re: Subscriptions ....
« Reply #15 on: August 08, 2013, 07:34:00 PM »

What is the error (in your error log) when recurring payment fails?



Is the transaction completed in your PayPal account?

no.

with the recurring subscription option removed, it works perfectly ...




Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: Subscriptions ....
« Reply #16 on: August 09, 2013, 08:19:49 AM »
How is the *subscription* set up? (A screen of the settings would be nice.)


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.

Offline RFD

  • Jr. Member
  • **
  • Posts: 287
  • They're coming to take me away, hah hah ....
Re: Subscriptions ....
« Reply #17 on: August 09, 2013, 01:39:11 PM »



Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,359
Re: Subscriptions ....
« Reply #18 on: August 09, 2013, 02:26:25 PM »

That's really odd.  It's a PayPal error, the payment never completes and the IPN isn't sent.

Try changing 'Length of Subscription' to '1 Years'.




Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,359
Re: Subscriptions ....
« Reply #19 on: August 09, 2013, 02:31:00 PM »

PP is getting an invalid value from this -

Code: [Select]

// All the standard bits.
$return_data['hidden']['business'] = $modSettings['paypal_email'];
$return_data['hidden']['item_name'] = $sub_data['name'] . ' ' . $txt['subscription'];
$return_data['hidden']['item_number'] = $unique_id;
$return_data['hidden']['currency_code'] = strtoupper($modSettings['paid_currency_code']);
$return_data['hidden']['no_shipping'] = 1;
$return_data['hidden']['no_note'] = 1;
$return_data['hidden']['amount'] = $value;
$return_data['hidden']['cmd'] = !$sub_data['repeatable'] ? '_xclick' : '_xclick-subscriptions';
$return_data['hidden']['return'] = $return_url;
$return_data['hidden']['a3'] = $value;
$return_data['hidden']['src'] = 1;
$return_data['hidden']['notify_url'] = $boardurl . '/subscriptions.php';

// Now stuff dependant on what we're doing.
if ($sub_data['flexible'])
{
$return_data['hidden']['p3'] = 1;
$return_data['hidden']['t3'] = strtoupper(substr($period, 0, 1));
}
else
{
preg_match('~(\d*)(\w)~', $sub_data['real_length'], $match);
$unit = $match[1];
$period = $match[2];

$return_data['hidden']['p3'] = $unit;
$return_data['hidden']['t3'] = $period;
}