I am using both the (paid)PayPal plugin and the Joomla Registration plugin. I have them both setup, transactions are posting, and registration occurs, but it is not working how it should.
Here is what I need to happen:
1. User fills out form
2. It registers the person (or checks to see if they are already registered).
2a. If they are already registered it returns an error stating they can't register again or similar and DOES NOT charge them.
3. If they aren't yet registered, the plugin charges a set price via paypal api and then registers them.
I found the tutorial under the Tutorials section of this site, and am pretty sure I did exactly what it stated.
Here is the code from the tutorial:
The issue I am having is that it:
1. Doesn't show a confirmation page
2. Sends an email even though I have the emails disabled
3. Charges the person TWICE for the amount I have set.
Any ideas?
Here is what I need to happen:
1. User fills out form
2. It registers the person (or checks to see if they are already registered).
2a. If they are already registered it returns an error stating they can't register again or similar and DOES NOT charge them.
3. If they aren't yet registered, the plugin charges a set price via paypal api and then registers them.
I found the tutorial under the Tutorials section of this site, and am pretty sure I did exactly what it stated.
Here is the code from the tutorial:
<?php
$MyPlugins =& CFPlugins::getInstance($MyForm->formrow->id);
if(!$MyPlugins->cf_joomla_registration['errors']){
$MyPlugins->runPlugin('after_email', array('ONSUBMIT', 'ONLOADONSUBMIT'), 'cf_paypal_api');
if($MyPlugins->cf_paypal_api['payment_status'] == 'SUCCESS'){
echo "Thank you for registering at Mysite.com. You will be recieving a confirmation email shortly";
$MyFormEmails =& CFEMails::getInstance($MyForm->formrow->id);
$MyFormEmails->setEmailData(1, 'enabled', '1');
$MyFormEmails->sendEmails($MyForm, $MyFormEmails->emails);
}else{
$regUser = new JUser($MyPlugins->cf_joomla_registration['user']->id);
$regUser->delete();
$MyForm->addErrorMsg( 'An error occured : '.$MyPlugins->cf_paypal_api['error_message'] );
$MyForm->haltFunction["autogenerated_after_email"] = true;
}
}else{
$MyForm->addErrorMsg($MyPlugins->cf_joomla_registration['errors']);
$MyForm->haltFunction["autogenerated_after_email"] = true;
}
?>
The issue I am having is that it:
1. Doesn't show a confirmation page
2. Sends an email even though I have the emails disabled
3. Charges the person TWICE for the amount I have set.
Any ideas?
Hi,
I think I have answered this at the Contact us but the solution is to disable the Paypal plugin under the plugins tab and leave the Joomla registration plugin only enabled.
Regards,
Max
I think I have answered this at the Contact us but the solution is to disable the Paypal plugin under the plugins tab and leave the Joomla registration plugin only enabled.
Regards,
Max
This topic is locked and no more replies can be posted.