Beispiel #1
0
		 }
		 if ($p->ipn_data['test_ipn'] == 1 && $dm->cfg['sandbox'] == 'No') {
		 	$problemOccured = true;
		 }
		 if ($dm->vendor_exists($p->ipn_data['receiver_email']) > 0 || $dm->cfg['paypalemail'] == $p->ipn_data['receiver_email']) {
		 	//
		 } else {
			 $problemOccured = true;
		 }
		 
         if ($problemOccured) {
         	//die();
         }
         echo 'OK';
	 	 //mail('*****@*****.**','completeorder?',$order_id . ' ' . $mode . print_r($_REQUEST,true)); ;
		 $dm->completeOrder($order_id,$mode);
         $dm->updateOrder($order_id,array(
			'first_name' =>  $p->ipn_data['first_name'],
			'last_name' => $p->ipn_data['last_name'],
			'organization' => $p->ipn_data['payer_business_name'],
			'address' => $p->ipn_data['address_street'],
			'city' => $p->ipn_data['address_city'],
			'state' => $p->ipn_data['address_state'],
			'zip' => $p->ipn_data['address_zip'],
			'country' => $p->ipn_data['address_country'],
			'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',
Beispiel #2
0
	$result = mysql_query("select * from $mosConfig_dbprefix" . "docmanpaypalconfig");
	while ($row = mysql_fetch_assoc($result)) {
		$$row['name'] = $row['value'];
	}
	foreach ($_REQUEST as $key => $val) {
		$$key = $val;
		$mailbody .= "$key = $val\n";
	}
	$tmp = unserialize(base64_decode($Extra1. $Extra2 . $Extra3));

    $doc_id = (int)$tmp['doc_id'];
    $order_id = (int)$tmp['order_id'];
    $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!');
<?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">