Exemplo n.º 1
0
 public function deleteMeta($id, $skey)
 {
     if (empty($skey)) {
         return false;
     }
     $row = $this->_db->QuerySingleRow("SELECT meta_id,meta_key,{$this->_meta_table_id} FROM `{$this->_meta}` WHERE meta_key='{$skey}' AND `{$this->_meta_table_id}`={$id}");
     rjdump($row);
     rjdump($this->_db->GetLastSQL());
     if ($row && $row->meta_id) {
         if ($this->_db->Query("DELETE FROM `{$this->_meta}` where `meta_id`=" . $row->meta_id)) {
             return true;
         }
     }
     return false;
 }
Exemplo n.º 2
0
 public static function sendEmail(&$txn, &$item)
 {
     $sent = false;
     if (!is_a($txn, 'RJDGPPTXN')) {
         return false;
     }
     if (!is_a($item, 'RJDGSHOP')) {
         return false;
     }
     $mail = new PHPMailer();
     ob_start();
     require_once dirname(__FILE__) . '/templates/sold.php';
     $contents = ob_get_clean();
     if (is_object($mail)) {
         try {
             $mail->isSMTP();
             $mail->Host = 'host288.hostmonster.com';
             $mail->Port = 465;
             $mail->SMTPSecure = 'ssl';
             $mail->SMTPAuth = true;
             $mail->Username = "******";
             $mail->Password = "******";
             $mail->setFrom('*****@*****.**', 'TheW3bmast3r');
             if (self::$sandbox) {
                 $mail->addAddress('*****@*****.**');
             } else {
                 $mail->addAddress($i->e);
             }
             $mail->Subject = 'No-Reply';
             $mail->msgHTML($contents);
             $mail->AltBody = 'Thank you for buying, your transaction id is:' . $txn->transaction_id;
             $sent = $mail->send() or die($mail->ErrorInfo);
         } catch (Exeption $e) {
             rjdump($e);
         }
         if (!$sent) {
             rjdump('error:' . $mail->ErrorInfo);
         }
     }
     return $sent;
 }
Exemplo n.º 3
0
            //			$txn->session_id=session_id();
            $txn->pending_reason = $pendingReason;
            $txn->reason_code = $reasonCode;
            $txn->fee_amount = $feeAmt;
            $txn->tax_amount = $taxAmt;
            $txn->exchange_rate = $exchangeRate;
            $txn->save();
            //send an email to the client
            try {
                $item = new RJDGSHOP($txn->shop_id);
                if ($txn->isComplete($item)) {
                    $email_sent = RJDGPP::sendEmail($txn, $item);
                }
                unset($item);
            } catch (Exception $e) {
                rjdump($e);
            }
        }
        //loadBy
        ?>
<html>
<script>
alert("Payment Successful");
// add relevant message above or remove the line if not required
window.onload = function(){
	/*
    if(window.opener){
         window.close();
     }else{
         if(top.dg.isOpen() == true){
             top.dg.closeFlow();