I am seeing the Auth code in the return URL from PayPal for example:
/index.php?auth=A2.uSamhLI95WqNLKPY0i581N9NQ23wHfqpbyFgr-qex6pVdmSN29PQnhPNUelAArHkjew&form_charset=UTF-8
Haven't a clue what that is, PayPal is changing the return url. The correct url is put together in
Profile-Actions.php -
$fields = $gateways[$id]->fetchGatewayFields($context['sub']['id'] . '+' . $memID, $context['sub'], $context['value'], $period, $scripturl . '?action=profile&u=' . $memID . '&area=subscriptions&sub_id=' . $context['sub']['id'] . '&done');
and is posted to Paypal with the other transaction data by
Subscriptions-PayPal.php -
// 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';
You'll have to contact PayPal support and ask them wtf they're doing.
Also, what happens if the subscriber does not hit the return to site button after payment does that mean SMF will not be able to record and Admin will have to manually enter the subscription based on an Email from Paypal?
The subscription should activate regardless of whether the subscriber returns to your forum or not. As I understand it, this is how the process works:
- Forum posts subscription data to PayPal
- If payment is successful, PP posts IPN to forum. IPN includes
verify_sign, which is verification code.
- Forum posts verification code back to PP.
- PP verifies code and posts verification to forum.
- Subscription activates.
None of this is affected by
$return_urlUpload the modified
Subscriptions-PayPal.php I posted in the other thread. It contains additional error handling that may tell you why subscription is failing.