- Posts: 6
- Thank you received: 0
Double notifications from PayPal?
- anderscarlen
- Topic Author
- Offline
- New Member
-
Less
More
12 years 10 months ago #21128
by anderscarlen
Double notifications from PayPal? was created by anderscarlen
Hi,
We are using JoomDonation and PayPal to collect donations on our site.
When a donation is placed the notification message gets sent out from JomDonation without any problem.
But the same message is sent out a second time shortly after the funds are transferred from the PayPal account to our bankaccount.
Do you know why?
Has this something to do with the trigger( 'onAfterPaymentSuccess') ?
Do you have any suggestion for how to avoid this second email to get sent out
/Thanks!
/anders
We are using JoomDonation and PayPal to collect donations on our site.
When a donation is placed the notification message gets sent out from JomDonation without any problem.
But the same message is sent out a second time shortly after the funds are transferred from the PayPal account to our bankaccount.
Do you know why?
Has this something to do with the trigger( 'onAfterPaymentSuccess') ?
Do you have any suggestion for how to avoid this second email to get sent out
/Thanks!
/anders
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 10 months ago #21162
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Double notifications from PayPal?
Hi Anders
It seems you are using old version of the extension. In the latest version (infact, this issue sometime happens on some sites but I fixed it long time ago), the extension only sent email one time only.
Unless you developed any plugin trigger onAfterPaymentSuccess event to send emails, the email will be sent only one time.
Could you please check the code in the file components/com_jdonation/payments/os_paypal.php, make sure the verifyPayment function is the same as follow :
Regards,
Tuan
It seems you are using old version of the extension. In the latest version (infact, this issue sometime happens on some sites but I fixed it long time ago), the extension only sent email one time only.
Unless you developed any plugin trigger onAfterPaymentSuccess event to send emails, the email will be sent only one time.
Could you please check the code in the file components/com_jdonation/payments/os_paypal.php, make sure the verifyPayment function is the same as follow :
Code:
function verifyPayment() {
$ret = $this->_validate();
if ($ret) {
$config = JoomDonationHelper::getConfig() ;
$id = $this->_data['custom'];
$transactionId = $this->_data['txn_id'];
$amount = $this->_data['mc_gross'];
if ($amount < 0)
return false ;
$row = JTable::getInstance('jdonation', 'Table');
$row->load($id);
if (!$row->id)
return false ;
$published = $row->published ;
$row->transaction_id = $transactionId ;
$row->payment_date = date('Y-m-d H:i:s');
$row->published = true;
$row->store();
if (!$published) {
JoomDonationHelper::sendEmails($row, $config);
JPluginHelper::importPlugin( 'jdonation' );
$dispatcher =& JDispatcher::getInstance();
$dispatcher->trigger( 'onAfterPaymentSuccess', array($row));
}
return true;
} else {
return false;
}
}
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- anderscarlen
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
12 years 10 months ago #21318
by anderscarlen
Replied by anderscarlen on topic Re: Double notifications from PayPal?
Thanks.
Problem solved!
Problem solved!
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 10 months ago #21319
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Double notifications from PayPal?
Great. Thanks for confirming !
Tuan
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Dang Thuc Dam, Dang Dam
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.