paying after a signup
mdowsett - May 1, 2008 - 15:07
| Project: | Signup Pay for a node |
| Version: | 5.x-1.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
If a user doesn't follow thru with using Paypal upon registration, there is no option for them to go back and continue with payment. This would also help on sites (like mine) where there are existing events open for signups with registrants....it'd be nice to have them go back to the site and see the paypment options which would update their signup_status appropriately.

#1
I have updated
function signup_pay_nodeapiby:ADD:
$method = $_SESSION['signup_pay_method'];after
function signup_pay_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {This gets the payment method from the active session.
REPLACE:
drupal_set_message(t('You have registered but not yet paid for this event.'), 'error');return;
}
with
// Check if user has selected paypal
if ($method == SIGNUP_PAY_METHOD_PAYPAL) {
drupal_set_message(t('You have registered but not paid for this event. Please <a href="/signup_pay_do_payment">click this link</a> to continue with your Paypal payment.'), 'error');
return;
}
drupal_set_message(t('You have registered but your payment has not been authorised yet. If you are paying by cheque or bank transfer, please make sure you have sent your payment according to the LINK TO INSTRUCTIONS PAGE HERE. If you are paying by paypal, click "Cancel signup" at the bottom and try again.'), 'error');
return;
}
else {
drupal_set_message(t('Congratulations! Your payment has been successfully authorised for this event.'));
return;
}
This code has certain limitations. The signup method is not hard coded into the database and is only available as a session. Therefore when a user navigates away from the site and has to log in again, then a different message is shown.
The first message: You have registered but not paid for this event. Please click this link to continue with your Paypal payment.
is shown if paypal is the payment method and the user is in the same session
The second message: You have registered but your payment has not been authorised yet. If you are paying by cheque or bank transfer, please make sure you have sent your payment according to the LINK TO INSTRUCTIONS PAGE HERE. If you are paying by paypal, click "Cancel signup" at the bottom and try again.
is shown if paypal isn't the payment method OR if the user is in a different session
The third message: Congratulations! Your payment has been successfully authorised for this event.
is shown if the user has paid.
Hope this helps someone out there! Code needs testing