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', '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);
$$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!'); 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']);
<?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">