Jon W
Well-known member
- Affected version
- 2.0.10
Allowing recurring payments for days > 90 and < 365 produces the following error on PayPal:
There doesn't seem to be a supportsRecurring method for PayPal, but it should allow for the following:
Also, "week" is listed in the abstract supportsRecurring method as supported, and that is inherited by the PayPal provider, but the PayPal provider class actually doesn't support it at present even though PayPal does. So I get the same error as above on PayPal when I try to build my own Purchase type that does allow weeks.
I think this could easily be fixed by replacing:
with:
in the getPaymentParams method.
Are these things that can be fixed in a future version of XF2 or whether I just need to fix them in my add-on?
FWIW, what you currently have is still a vast improvement on XF1!!
Thanks.
Invalid Regular period. You must specify valid values for the A3, P3 and T3 parameters for a subscription.
There doesn't seem to be a supportsRecurring method for PayPal, but it should allow for the following:
PHP:
case 'day':
if ($amount <= 90)
{
$supported = true;
}
break;
case 'week':
if ($amount <= 52)
{
$supported = true;
}
break;
case 'month':
if ($amount <= 24)
{
$supported = true;
}
break;
case 'year':
if ($amount <= 5)
{
$supported = true;
}
break;
Also, "week" is listed in the abstract supportsRecurring method as supported, and that is inherited by the PayPal provider, but the PayPal provider class actually doesn't support it at present even though PayPal does. So I get the same error as above on PayPal when I try to build my own Purchase type that does allow weeks.
I think this could easily be fixed by replacing:
PHP:
switch ($purchase->lengthUnit)
{
case 'day': $params['t3'] = 'D'; break;
case 'month': $params['t3'] = 'M'; break;
case 'year': $params['t3'] = 'Y'; break;
default: $params['t3'] = ''; break;
}
PHP:
switch ($purchase->lengthUnit)
{
case 'day': $params['t3'] = 'D'; break;
case 'week': $params['t3'] = 'W'; break;
case 'month': $params['t3'] = 'M'; break;
case 'year': $params['t3'] = 'Y'; break;
default: $params['t3'] = ''; break;
}
Are these things that can be fixed in a future version of XF2 or whether I just need to fix them in my add-on?
FWIW, what you currently have is still a vast improvement on XF1!!
Thanks.