PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
<?php
$to = 'admin@abcd.com;
$subject = 'Payment Received';
$message = 'Hi John,. "\r\n" . $_GET['user_name'] . ", " . $_GET['user_id'] . " (ID) of $_GET['user_email'] has paid " . $_GET['amount'] . " for " . $_GET['item'] . "."rn"Congrats!!"rn"From Payment Notification Dept';
$headers = 'From: mail.optionsweekly.org';
mail($to, $subject, $message, $headers);
?>
<?php
if ($_GET['secret_key'] === 'gha294jas2583dkdhat345') {
$to = 'admin@abcd.com';
$subject = 'Payment Received';
$message = 'Hi John,' . "\r\n" . $_GET['full_name'] . ', ' . $_GET['subscr_id'] . ' (ID) of ' . $_GET['payer_email'] . ' has paid ' . $_GET['initial'] . ' for ' . $_GET['item_number'] . '.' . "\r\n" . 'Congrats!!' . "\r\n" . 'From Payment Notification Dept';
$headers = 'From: mail.optionsweekly.org';
mail($to, $subject, $message, $headers);
}
?>
<?phpif ($_GET['secret_key'] === 'gha294jas2583dkdhat345') { $to = 'admin@abcd.com'; $subject = 'Payment Received'; $message = 'Hi John,' . "\r\n" . $_GET['full_name'] . ', ' . $_GET['subscr_id'] . ' (ID) of ' . $_GET['payer_email'] . ' has paid ' . $_GET['initial'] . ' for ' . $_GET['item_number'] . '.' . "\r\n" . 'Congrats!!' . "\r\n" . 'From Payment Notification Dept'; $headers = 'From: mail.optionsweekly.org'; mail($to, $subject, $message, $headers);}?>
<?phpif ($_GET['secret_key'] === 'gXXxxxxxxxx5') { $to = 'admin@abcd.com'; $subject = 'New Registration'; $message = 'Hi John,' . "\r\n" . $_GET['full_name'] . ', ' . $_GET['subscr_id'] . ' (ID) of ' . $_GET['payer_email'] . ' has paid ' . $_GET['initial'] . ' for ' . $_GET['item_number'] . '.' . "\r\n" . 'Congrats!!' . "\r\n" . 'From New Registration' Dept'; $headers = 'From: mail.optionsweekly.org'; mail($to, $subject, $message, $headers);}?>
<?phpif ($_GET['secret_key'] === 'YGHDxxxxx8') { $to = 'admin@abcd.com'; $subject = 'Refund'; $message = 'Hi John,' . "\r\n" . $_GET['full_name'] . ', ' . $_GET['subscr_id'] . ' (ID) of ' . $_GET['payer_email'] . ' has paid ' . $_GET['initial'] . ' for ' . $_GET['item_number'] . '.' . "\r\n" . 'Congrats!!' . "\r\n" . 'From New Refund Dept'; $headers = 'From: mail.optionsweekly.org'; mail($to, $subject, $message, $headers);}?>
<?php
if ($_GET['secret_key'] === 'gha294jas2583dkdhat345' && strpos('signup, payment, registration,', $_GET['notification']) !== false)
$_GET['notification']();
function signup() {
$to = 'admin@abcd.com';
$subject = 'Payment Received';
$message = 'Hi John,' . "\r\n" . $_GET['full_name'] . ', ' . $_GET['subscr_id'] . ' (ID) of ' . $_GET['payer_email'] . ' has paid ' . $_GET['initial'] . ' for ' . $_GET['item_number'] . '.' . "\r\n" . 'Congrats!!' . "\r\n" . 'From Payment Notification Dept';
$headers = 'From: mail.optionsweekly.org';
mail($to, $subject, $message, $headers);
}
?>
<?phpif
($_GET['secret_key'] === 'gha294jas2583dkdhat345' && strpos('signup, payment, registration, refund, upgrade,', $_GET['notification']) !== false)
$_GET['notification']();function signup()
{
$to = 'admin@abcd.com';
$subject = 'Payment Received';
$message = 'Hi John,' . "\r\n" .
$_GET['full_name'] . ', ' . $_GET['subscr_id'] . ' (ID) of ' . $_GET['payer_email'] . ' has paid ' . $_GET['initial'] . ' for ' . $_GET['item_number'] . '.' . "\r\n" . 'Congrats!!' . "\r\n" . 'From Payment Notification Dept';
$headers = 'From: mail.optionsweekly.org';
mail($to, $subject, $message, $headers);
}
$_GET['notification']();function payment()
{
$to = 'admin@abcd.com';
$subject = 'Payment Received';
$message = 'Hi John,' . "\r\n" .
$_GET['full_name'] . ', ' . $_GET['subscr_id'] . ' (ID) of ' . $_GET['payer_email'] . ' has paid ' . $_GET['initial'] . ' for ' . $_GET['item_number'] . '.' . "\r\n" . 'Congrats!!' . "\r\n" . 'From Payment Notification Dept';
$headers = 'From: mail.optionsweekly.org';
mail($to, $subject, $message, $headers);
}
$_GET['notification']();function registration()
{
$to = 'admin@abcd.com';
$subject = 'Payment Received';
$message = 'Hi John,' . "\r\n" .
$_GET['full_name'] . ', ' . $_GET['subscr_id'] . ' (ID) of ' . $_GET['payer_email'] . ' has paid ' . $_GET['initial'] . ' for ' . $_GET['item_number'] . '.' . "\r\n" . 'Congrats!!' . "\r\n" . 'From Payment Notification Dept';
$headers = 'From: mail.optionsweekly.org';
mail($to, $subject, $message, $headers);
}
$_GET['notification']();function refund()
{
$to = 'admin@abcd.com';
$subject = 'Payment Received';
$message = 'Hi John,' . "\r\n" .
$_GET['full_name'] . ', ' . $_GET['subscr_id'] . ' (ID) of ' . $_GET['payer_email'] . ' has paid ' . $_GET['initial'] . ' for ' . $_GET['item_number'] . '.' . "\r\n" . 'Congrats!!' . "\r\n" . 'From Payment Notification Dept';
$headers = 'From: mail.optionsweekly.org';
mail($to, $subject, $message, $headers);
}
$_GET['notification']();function upgrade()
{
$to = 'admin@abcd.com';
$subject = 'Payment Received';
$message = 'Hi John,' . "\r\n" .
$_GET['full_name'] . ', ' . $_GET['subscr_id'] . ' (ID) of ' . $_GET['payer_email'] . ' has paid ' . $_GET['initial'] . ' for ' . $_GET['item_number'] . '.' . "\r\n" . 'Congrats!!' . "\r\n" . 'From Payment Notification Dept';
$headers = 'From: mail.optionsweekly.org';
mail($to, $subject, $message, $headers);
}
?>
What r the errors? How can I recitfy them?Cristián Lávaque wrote:No, you have some errors.
Those replacements codes i will replace them... hehhehe I just wanted you to see with the additional lines of codes, will the script still works...Cristián Lávaque wrote:Also, you're using the same replacement codes for every notification, when each notification will have them vary, so you need to read the documentation at WP Admin -> s2Member -> API / Notifications for each.
<?phpif
($_GET['secret_key'] === '123hehfge235343dhe' && strpos('signup, registration, payment, cancellation, eot, refund,', $_GET['notification']) !== false)
if($_GET['notification']();function signup())
{
$to = 'allan@abcd.com';
$subject = 'New Suscription Signup Or 7 Day Trial At abcd.com';
$message = 'Hi John and Allan,' . "\r\n" . "\r\n" .
'Member: ' . $_GET['full_name'] . "\r\n" .
'Subscription ID: ' . $_GET['subscr_id'] . "\r\n" .
'No. of free trial days: ' . $_GET['initial_term'] . "\r\n" .
'Recurring every ' . $_GET['regular_term'] . "\r\n" .
'Paypal email: ' . $_GET['payer_email'] . "\r\n" .
'will pay $' . $_GET['recurring'] . ' later when they are billed, if they have free trial.' ."\r\n" .
'for ' . $_GET['item_name'] . "\r\n" . "\r\n" .
'Congrats!! Have we reach 1,000 yet??' . "\r\n" . "\r\n" . 'From Members Dept';
$headers = 'From: mail.abcd.com';
mail($to, $subject, $message, $headers);
}
if($_GET['notification']();function registration())
{
$to = 'allan@abcd.com';
$subject = 'New Members At abcd.com';
$message = 'Hi John and Allan,' . "\r\n" . "\r\n" .
'Role: ' . $_GET['role'] . "\r\n" .
'Member: ' . $_GET['user_full_name'] . "\r\n" .
'Username: ' . $_GET['user_login'] . "\r\n" .
'Email: ' . $_GET['user_email'] . "\r\n" .
'DOB: ' . $_GET['date_of_birth'] . "\r\n" .
'Country: ' . $_GET['country'] . "\r\n" . "\r\n" .
'Congrats!! Allan, Please setup the Subcribe2 attributes for these members. Have we reach 10,000 yet??!' . "\r\n" . "\r\n" . 'From Members Dept';
$headers = 'From: mail.abcd.com';
mail($to, $subject, $message, $headers);
}
if($_GET['notification']();function payment())
{
$to = 'allan@abcd.com';
$subject = 'Payment Received At abcd.com';
$message = 'Hi John and Allan,' . "\r\n" . "\r\n" .
'Member: ' . $_GET['full_name'] . "\r\n" .
'Username: ' . $_GET['user_login'] . "\r\n" .
'Subscription ID: ' . $_GET['subscr_id'] . "\r\n" .
'Paypal email: ' . $_GET['payer_email'] . "\r\n" .
'has paid $' . $_GET['amount'] . "\r\n" .
'for ' . $_GET['item_name'] . "\r\n" . "\r\n" . 'Congrats!!' . "\r\n" . "\r\n" . 'From Payment Notification Dept';
$headers = 'From: mail.abcd.com';
mail($to, $subject, $message, $headers);
}
if($_GET['notification']();function cancellation())
{
$to = 'allan@abcd.com';
$subject = 'Member Cancelled At abcd.com';
$message = 'Hi John and Allan,' . "\r\n" . "\r\n" .
'Member: ' . $_GET['user_full_name'] . "\r\n" .
'Username: ' . $_GET['user_login'] . "\r\n" .
'Email: ' . $_GET['user_email'] . "\r\n" .
'Subscription ID: ' . $_GET['subscr_id'] . "\r\n" .
'has cancelled ' . $_GET['item_name'] . "\r\n" . "\r\n" . 'Bad news. Find out why!! Anyways we can offer them a good deal to stay with us?' . "\r\n" . "\r\n" . 'From Members Dept';
$headers = 'From: mail.abcd.com';
mail($to, $subject, $message, $headers);
}
if($_GET['notification']();function eot())
{
$to = 'allan@abcd.com';
$subject = 'Member EOT At abcd.com';
$message = 'Hi John and Allan,' . "\r\n" . "\r\n" .
'EOT Event: ' . $_GET['eot_del_type'] . "\r\n" .
'Member: ' . $_GET['user_full_name'] . "\r\n" .
'Username: ' . $_GET['user_login'] . "\r\n" .
'Email: ' . $_GET['user_email'] . "\r\n" .
'Subscription ID: ' . $_GET['subscr_id'] . "\r\n" .
'DOB: ' . $_GET['date_of_birth'] . "\r\n" . "\r\n" .
'Anyways we can offer them a better deal to stay with us? Last chance!' . "\r\n" . "\r\n" . 'From Members Dept';
$headers = 'From: mail.abcd.com';
mail($to, $subject, $message, $headers);
}
if($_GET['notification']();function refund())
{
$to = 'allan@abcd.com';
$subject = 'Member Refund At abcd.com';
$message = 'Hi John and Allan,' . "\r\n" . "\r\n" .
'Member: ' . $_GET['full_name'] . "\r\n" .
'Parent Txn ID: ' . $_GET['parent_txn_id'] . "\r\n" .
'Subscription ID: ' . $_GET['subscr_id'] . "\r\n" .
'Paypal email: ' . $_GET['payer_email'] . "\r\n" .
'has processed for refund of $' . $_GET['-amount'] . "\r\n" .
'for ' . $_GET['item_name'] . "\r\n" .
'We got back from Paypal, $' . $_GET['-fee'] . "\r\n" . "\r\n" .
'Bad news. Find out why!! We don't usually deal with refunds.' . "\r\n" . "\r\n" . 'From Refund Notification Dept';
$headers = 'From: mail.abcd.com;
mail($to, $subject, $message, $headers);
}
?>
<?php
if ($_GET['secret_key'] === 'gha294jas2583dkdhat345' && strpos('signup registration payment cancellation eot refund', $_GET['notification']) !== false)
$_GET['notification']();
function signup() {
//
}
function registration() {
//
}
function payment() {
//
}
function cancellation() {
//
}
// And so on.
?>
Users browsing this forum: Google [Bot] and 1 guest