Community Support Forums — WordPress® ( Users Helping Users ) — 2011-04-14T11:02:15-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=3141 2011-04-14T11:02:15-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3141&p=10728#p10728 <![CDATA[Re: Notify to my email a payment transaction]]>

Statistics: Posted by Cristián Lávaque — April 14th, 2011, 11:02 am


]]>
2011-04-14T09:56:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3141&p=10726#p10726 <![CDATA[Re: Notify to my email a payment transaction]]> Statistics: Posted by OWeekly — April 14th, 2011, 9:56 am


]]>
2011-04-13T19:57:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3141&p=9698#p9698 <![CDATA[Re: Notify to my email a payment transaction]]>
Code:
<?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.
?>

Statistics: Posted by Cristián Lávaque — April 13th, 2011, 7:57 pm


]]>
2011-04-13T13:17:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3141&p=9684#p9684 <![CDATA[Re: Notify to my email a payment transaction]]>

Code:
<?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 = '
Frommail.abcd.com;    
mail($to$subject$message$headers);
}
?>

Statistics: Posted by OWeekly — April 13th, 2011, 1:17 pm


]]>
2011-04-13T06:58:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3141&p=9675#p9675 <![CDATA[Re: Notify to my email a payment transaction]]>
Cristián Lávaque wrote:
No, you have some errors.
What r the errors? How can I recitfy them?

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.
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...

If u dun mind pls can u help me clarify the errors that u see on the previous code. Thanks.

Statistics: Posted by OWeekly — April 13th, 2011, 6:58 am


]]>
2011-04-12T23:46:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3141&p=9651#p9651 <![CDATA[Re: Notify to my email a payment transaction]]>
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.

Statistics: Posted by Cristián Lávaque — April 12th, 2011, 11:46 pm


]]>
2011-04-12T23:04:04-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3141&p=9647#p9647 <![CDATA[Re: Notify to my email a payment transaction]]>
Code:
<?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);
}

?>

Statistics: Posted by OWeekly — April 12th, 2011, 11:04 pm


]]>
2011-04-12T17:16:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3141&p=9589#p9589 <![CDATA[Re: Notify to my email a payment transaction]]>

Nah, you can use the same key as long as it's kept secret.

You could actually have all those notifications processed in the same script, just add a new parameter that will tell your script what type of notification to handle.

Code:
<?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);
}
?>


Then just add it to the URL like this &notification=signup.

Statistics: Posted by Cristián Lávaque — April 12th, 2011, 5:16 pm


]]>
2011-04-12T16:00:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3141&p=9585#p9585 <![CDATA[Re: Notify to my email a payment transaction]]>
my next Qns for u are:

Can I use the same script file (use different secret keys ) and add on commands for the registration's email notification, refund, modify, etc below's code.... or must i add new new scripts for each tye of notification?

Code:
<?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);}?>




Thanks!!

Statistics: Posted by OWeekly — April 12th, 2011, 4:00 pm


]]>
2011-04-12T15:09:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3141&p=9584#p9584 <![CDATA[Re: Notify to my email a payment transaction]]>

You have some PHP syntax errors in the $to and $message variables. Anyway, you need your script to get the data from the notification you set up in s2Member for signups.

Your notification URL could be:
http://yoursite.com/yourscript.php?secret_key=gha294jas2583dkdhat345&full_name=%%full_name%%&subscr_id=%%subscr_id%%&payer_email=%%payer_email%%&initial=%%initial%%

It's using the replacement codes available to the signup notification, but they vary depending on the kind of notification.

Following your example, something like this may work for you in the script you're notifying with the API:

Code:
<?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);
}
?>


I hope that helps. :)

Statistics: Posted by Cristián Lávaque — April 12th, 2011, 3:09 pm


]]>
2011-04-12T14:47:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3141&p=9582#p9582 <![CDATA[Re: Notify to my email a payment transaction]]>
http://www.optionsweekly.org/notify.php?user_name=%%full_name%%&user_id=%%user_id%%&user_email=%%payer_email%%&amount=%%amount%%&item=%%item_name%%

the file is notify.php which he showed above me.

Statistics: Posted by Dranz1r — April 12th, 2011, 2:47 pm


]]>
2011-04-12T13:32:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3141&p=9580#p9580 <![CDATA[Re: Notify to my email a payment transaction]]>
I am facing similar problem... I have watched the video 3 times, I tried to engage a coder and its not working... Can u please help me check the code?

I do not know how to code proficiently and i got a coder to help me, but he does not fully understand...

on the video, it said to put a script.php?........... then create the script.php file ....

My code for that reads...

Code:
<?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);

?>


Is it correct??? Help would be apprciated thanks.

Statistics: Posted by OWeekly — April 12th, 2011, 1:32 pm


]]>
2011-04-12T11:44:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3141&p=9578#p9578 <![CDATA[Re: Notify to my email a payment transaction]]>

WP Admin -> s2Member -> API / Notifications
http://www.s2member.com/api-tracking-no ... ons-video/

Statistics: Posted by Cristián Lávaque — April 12th, 2011, 11:44 am


]]>
2011-04-12T11:28:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3141&p=9577#p9577 <![CDATA[Notify to my email a payment transaction]]>
Hi Admin,
%%user_full_name%% (Name), %%user_id%% (ID) of %%user_email%% (email) has paid %%amount%% (amount) for %%item_name%% (item).
Congrats!!
From Payment Notification Dept

I know PHP, but I don't know how to use it with s2member.
Help?

Statistics: Posted by Dranz1r — April 12th, 2011, 11:28 am


]]>