Several email notifications to users

Please ask questions, report bugs and share your ideas about 2CheckOut Integrator in this forum

Several email notifications to users

Postby IToris team » Tue Jun 15, 2010 1:28 pm

E.g. you want to provide a membership to your site or links to download a product only when the order is fully processed by 2CheckOut. Sometimes payments can succeed initially and fail on a later checking.

So two emails will be sent to your users:

~Initial email when the payment is sent to 2CO (order created)
~Final email with private data when the payment is approved (fraud status changed - success)OR final email when the payment is failed (fraud status changed - fail).





Order created.
1.1. Please create a new event of ORDER_CREATED type.

1.2. In its PHP script please delete the comment in line
Code: Select all
sendEmail();


1.3. In email template please add From Name*, From Email*, Subject* and Body.
To* should contain {customer_email} variable if the email should be sent to client, or admin email. Please use CC and BCC fields if email should be sent to both admin and client. Several addresses can be added comma-separated.

Fraud status changed – success
2.1. Please create a new event of FRAUD_STATUS_CHANGED type.

2.2. In PHP script delete all code and insert:

Code: Select all
$fraud_status = strtolower(@$_REQUEST['fraud_status']);

if ($fraud_status == 'pass') {

    $database =& JFactory::getDBO();

    // here you can put your own PHP code

    sendEmail();

}


Create email template – same as in 1.3.



Fraud status changed – fail
3.1. Create a new event of FRAUD_STATUS_CHANGED type.

3.2. Delete everything in PHP script area. Insert the following code:

Code: Select all
$fraud_status = strtolower(@$_REQUEST['fraud_status']);

if ($fraud_status == 'fail') sendEmail();


3.3. Create email template – same as 1.3. and 2.3.
IToris team
Site Admin
 
Posts: 1685
Joined: Mon Jan 19, 2009 12:33 pm

Return to 2CheckOut Integrator

Who is online

Users browsing this forum: No registered users and 1 guest

cron