<?php ini_set('max_execution_time', 600); //600 seconds = 10 minutes $cron = new cron(); $cron->domain_id=1; $message = $cron->run(); try { //json //header('Content-type: application/json'); //echo encode::json( $message, 'pretty' ); //xml ob_end_clean(); header('Content-type: application/xml'); echo encode::xml( $message ); } catch (Exception $e) { echo $e->getMessage(); }
$firsttime = TRUE; if ($codtxt == "") { $key2 = "key"; } } if ($key == "") { $key = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; } $key = strtoupper($key); $key2 = strtoupper($key2); $orgtxt = strtoupper($orgtxt); $codtxt = strtoupper($codtxt); require_once $ks_hilf[pfad] . '/entschluesseln.php'; require_once $ks_hilf[pfad] . '/verschluesseln.php'; $coder1 = new decipher(); $coder2 = new encode(); switch ($ersetze) { case "W=VV": $from = "W"; $to = "VV"; $ersetze1 = "SELECTED"; $key = str_replace("W", "VV", $key); $key2 = str_replace("W", "VV", $key2); break; case "": case "I=J": $from = "I"; $to = "J"; $ersetze2 = "SELECTED"; $key = str_replace('I', 'J', $key); $key2 = str_replace('I', 'J', $key2);
<?php //get invoice details $invoice = invoice::select('1'); //echo json_encode($invoice); //header('Content-type: application/xml'); echo encode::xml($invoice); //print_r($invoice);
$payment->ac_payment_type = $payment_type->select_or_insert_where(); $logger->log('Paypal - payment_type=' . $payment->ac_payment_type, Zend_Log::INFO); $payment->insert(); $invoice = invoice::select($p->ipn_data['invoice']); #$invoice = invoice::select($_POST['invoice']); $biller = getBiller($invoice['biller_id']); //send email $body = "A Paypal instant payment notification was successfully recieved into Simple Invoices\n"; $body .= "from " . $p->ipn_data['payer_email'] . " on " . date('m/d/Y'); $body .= " at " . date('g:i A') . "\n\nDetails:\n"; $body .= $paypal_data; $email = new email(); $email->notes = $body; $email->to = $biller['email']; $email->from = "*****@*****.**"; $email->subject = 'Instant Payment Notification - Recieved Payment'; $email->send(); $xml_message['data'] .= $body; } } else { $xml_message .= "Paypal validate failed"; $logger->log('Paypal validate failed', Zend_Log::INFO); } header('Content-type: application/xml'); try { $xml = new encode(); $xml->xml($xml_message); echo $xml; } catch (Exception $e) { echo $e->getMessage(); }