Exemple #1
0
 */
 $reasonCode = $resArray["PAYMENTINFO_0_REASONCODE"];
 // Add javascript to close Digital Goods frame. You may want to add more javascript code to
 // display some info message indicating status of purchase in the parent window
 $txn = new RJDGPPTXN();
 if ($txn->loadBy('token', $token)) {
     $txn->payer_id = $payerID;
     $txn->transaction_id = $transactionId;
     $txn->transaction_type = $transactionType;
     $txn->price = $amt;
     $txn->payment_type = $paymentType;
     $txn->payment_status = $paymentStatus;
     $txn->currency_code = $currencyCode;
     $txn->order_time = $orderTime;
     $txn->server_order_time = date('Y-m-d H:i:s');
     $txn->session_expire = RJSES::expireDateTime();
     //			$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) {