Ejemplo n.º 1
0
function espresso_process_ideal_report($payment_data)
{
    $ideal_mollie_settings = get_option('event_espresso_ideal_mollie_settings');
    $payment_data['txn_type'] = 'iDeal Mollie';
    $payment_data['txn_details'] = serialize($_REQUEST);
    $payment_data['payment_status'] = 'Incomplete';
    $payment_data['txn_id'] = 0;
    require_once 'ideal.class.php';
    $partner_id = $ideal_mollie_settings['ideal_mollie_partner_id'];
    // Uw mollie partner ID
    if (isset($_GET['transaction_id'])) {
        $payment_data['txn_id'] = $_GET['transaction_id'];
        $iDEAL = new iDEAL_Payment($partner_id);
        $iDEAL->checkPayment($_GET['transaction_id']);
        if ($iDEAL->getPaidStatus() == true) {
            $payment_data['payment_status'] = "Completed";
        } else {
            ?>
			<h2 style="color:#F00;"><?php 
            _e('There was an error processing your transaction!', 'event_espresso');
            ?>
</h2> <?php 
        }
    }
    $payment_data = apply_filters('filter_hook_espresso_get_total_cost', $payment_data);
    $payment_data = apply_filters('filter_hook_espresso_prepare_event_link', $payment_data);
    $payment_data = apply_filters('filter_hook_espresso_update_attendee_payment_data_in_db', $payment_data);
    do_action('action_hook_espresso_email_after_payment', $payment_data);
    return $payment_data;
}
Ejemplo n.º 2
0
 function checkTransaction($pmconfigs, $order, $act)
 {
     $jshopConfig =& JSFactory::getConfig();
     $iDEAL = new iDEAL_Payment($pmconfigs['partnerid']);
     if ($pmconfigs['testmode']) {
         $iDEAL->setTestMode();
     }
     $iDEAL->checkPayment($_GET['transaction_id']);
     $paidstatus = $iDEAL->getPaidStatus();
     $bankstatus = $iDEAL->getBankStatus();
     if ($bankstatus != "CheckedBefore") {
         pm_ideal::saveTrSatus($_GET['transaction_id'], $paidstatus, $bankstatus);
     } else {
         $data = pm_ideal::getTrSatus($_GET['transaction_id']);
         $paidstatus = $data->paid;
         $bankstatus = $data->status;
     }
     if ($paidstatus) {
         saveToLog("paymentdata.log", "OK. Order ID " . $order->order_id . ". " . $iDEAL->getAmount() . ", " . $iDEAL->getBankStatus());
         return array(1, '');
     } else {
         if ($bankstatus == "Cancelled") {
             return array(3, "Status cancelled. Order ID " . $order->order_id);
         } elseif ($bankstatus == "Failure") {
             return array(3, "Status Failure. Order ID " . $order->order_id);
         } else {
             saveToLog("paymentdata.log", "Order ID " . $order->order_id . ". " . $iDEAL->getAmount() . ", " . $bankstatus . ", " . $iDEAL->getErrorMessage());
             return array(0, "");
         }
     }
 }
 function check($transaction_id)
 {
     require_once 'ideal.class.php';
     $partner_id = $this->partnerID;
     // Uw mollie partner ID
     $iDEAL = new iDEAL_Payment($partner_id);
     if ($this->testMode) {
         $iDEAL->setTestMode();
     }
     $iDEAL->checkPayment($transaction_id);
     if ($iDEAL->getPaidStatus() == true) {
         /* De betaling is betaald, deze informatie kan opgeslagen worden (bijv. in de database).
            Met behulp van $iDEAL->getConsumerInfo(); kunt u de consument gegevens ophalen (de 
            functie returned een array). Met behulp van $iDEAL->getAmount(); kunt u het betaalde
            bedrag vergelijken met het bedrag dat afgerekend zou moeten worden. */
         $data = array('customerInfo' => $iDEAL->getConsumerInfo(), 'amount' => $iDEAL->getAmount());
         return $data;
     } else {
         $data = array('error' => true, 'msg' => 'Kon geen betaling vinden met deze transactie id.');
         return $data;
     }
 }
Ejemplo n.º 4
0
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
require "../../../init.php";
$whmcs->load_function("gateway");
$whmcs->load_function("invoice");
$gatewaymodule = "mollieideal";
$GATEWAY = getGatewayVariables($gatewaymodule);
if (!$GATEWAY['type']) {
    exit("Module Not Activated");
}
$invoiceid = urldecode($_GET['invoiceid']);
$transid = $_GET['transaction_id'];
$amount = urldecode($_GET['amount']);
$fee = urldecode($_GET['fee']);
checkCbTransID($transid);
if (isset($transid)) {
    $iDEAL = new iDEAL_Payment($GATEWAY['partnerid']);
    $iDEAL->checkPayment($_GET['transaction_id']);
    if ($iDEAL->getPaidStatus() == true) {
        addInvoicePayment($invoiceid, $transid, $amount, $fee, $gatewaymodule);
        logTransaction($GATEWAY['name'], $_GET, "Successful");
        return 1;
    }
    logTransaction($GATEWAY['name'], $_GET, "Unsuccessful");
}
Ejemplo n.º 5
0
 public function validateNotification($response, $post, $invoice)
 {
     require_once dirname(__FILE__) . '/lib/cls.ideal.php';
     $response = array();
     $response['valid'] = false;
     $transaction_id = aecGetParam('transaction_id', '', true, array('word', 'string', 'clear_nonalnum'));
     if (strlen($transaction_id)) {
         $mollieIdeal = new iDEAL_Payment($this->settings['partner_id']);
         $mollieIdeal->checkPayment($transaction_id);
         if ($mollieIdeal->getPaidStatus()) {
             $response['valid'] = true;
         } else {
             // error handling
             $response['error'] = true;
             $response['errormsg'] = 'iDEAL_Payment::checkPayment failed';
             $this->___logError("iDEAL_Payment::checkPayment failed", $mollieIdeal->getErrorCode(), $mollieIdeal->getErrorMessage());
         }
     }
     return $response;
 }