Ejemplo n.º 1
0
			'phone' => '-',
         	'price' => $p->ipn_data['mc_gross'],
         	'mc_currency' => $p->ipn_data['mc_currency'],
         	'transaction' => $p->ipn_data['txn_id'],
         	'email' => $p->ipn_data['payer_email'],
         	'merchant' => 'PayPal',
         	'src' => $mode
         ));
         
         foreach ($p->ipn_data as $ipnkey => $ipnvalue) { $body .= "\n$ipnkey: $ipnvalue"; }
         	 $app = JFactory::getApplication();
         	 $mail = JFactory::getMailer();
	         //$mail->IsHTML(true);
	         $mail->setBody($body);
	         $mail->setSubject($subject);
	         if ($app->getCfg('mailer') == 'smtp') {
		         $mail->useSMTP($app->getCfg('smtpauth'),$app->getCfg('smtphost'),$app->getCfg('smtpuser'),$app->getCfg('smtppass'),$app->getCfg('smtpsecure'),$app->getCfg('smtpport'));
	 		 }
	 		 $mail->setSender(array($app->getCfg('mailfrom'), $app->getCfg('fromname')));
	         $mail->addRecipient($notifyemail);
	         $mail->Send();
         
         
         if ($cfg['emailDelivery'] == 1) {
			$dm->doEmailDelivery($p->ipn_data['payer_email'],$doc_id,$order_id,$key);
         }
         echo "OK";
      } 
      break;
 }     
?>
Ejemplo n.º 2
0
    $key = $tmp['key'];
	//mail('*****@*****.**', 'debug', print_r($_REQUEST,true) . "\r\n\r\n" . print_r($tmp,true));
    if ($TransactionAccepted == 'true') {
	    $dm->completeOrder(JRequest::getVar('order_id'));
	
	    $dm->updateOrder(JRequest::getVar('order_id'),array(
	    'price' => $Amount,
	    'mc_currency' => 'ZAR',
	    'transaction' => $Reference,
	    'email' => 'Credit Card',
	    'merchant' => 'Netcash'
	    ));
    }    
    	 $conf =& JFactory::getConfig();
		 $mail = JFactory::getMailer();
	     //$mail->IsHTML(true);
	     $mail->to = array();	
	     $mail->setBody($mailbody);
	     $mail->setSubject('DOCman PayPal IPN (Pay Per Download) - Netcash Order Received!');
	     if ($conf->getValue('config.mailer') == 'smtp') {
	      	$mail->useSMTP($conf->getValue('config.smtpauth'),$conf->getValue('config.smtphost'),$conf->getValue('config.smtpuser'),$conf->getValue('config.smtppass'),$conf->getValue('config.smtpsecure'),$conf->getValue('config.smtpport'));
	     }
	     $mail->setSender($conf->getValue('config.mailfrom'));
	     $mail->addRecipient($dm->cfg['netcash_notifyemail']);
	     $mail->Send();
	
	if ($dm->cfg['emailDelivery'] == 1) {
		$dm->doEmailDelivery($pay_from_email,$doc_id,$order_id,$key);
	}
}
?>
Ejemplo n.º 3
0
<?php
$jc = new JConfig();
$mosConfig_db = $jc->db;
$mosConfig_dbprefix = $jc->dbprefix;
$mosConfig_host = $jc->host;
$mosConfig_password = $jc->password;
$mosConfig_user = $jc->user;
$link = mysql_connect($mosConfig_host,$mosConfig_user,$mosConfig_password);
mysql_select_db($mosConfig_db,$link);
$dm = new docmanpaypal();
if (!$dm->constructRun) {
	$dm->__construct();
}
$doc_id = (int)JRequest::getVar('id');
if ($dm->hasLicense == false) {
	$product_price = 0.10;
}
if ($task == 'submit_order') {
$seller_id = mysql_result(mysql_query("select user_id from $mosConfig_dbprefix" . "docmanpaypal where `id` = " . JRequest::getVar('id')),0);
if (is_numeric(JRequest::getVar('id')) and JRequest::getVar('id') > 0) {
	$product_price = mysql_result(mysql_query("select price from $mosConfig_dbprefix" . "docmanpaypal where `id` = " . JRequest::getVar('id')),0);
	$product_name = mysql_result(mysql_query("select dmname from $mosConfig_dbprefix" . "docman where `id` = " . JRequest::getVar('id')),0);
} else {
	die("<h1>Failure.</h1>");
}
if ($dm->cfg['useVat'] > 0) {
	$vat =  $dm->vatCalc($product_price);
}
?>
<form action="https://www.moneybookers.com/app/payment.pl" method="post" name="dmp_order_form">