Initial import: Carteasy Shop (Dev-Stand)

This commit is contained in:
Thomas Bartelt
2026-04-20 01:03:43 +02:00
commit d504f8a05d
3845 changed files with 761050 additions and 0 deletions
@@ -0,0 +1,46 @@
<?php
require_once(dirname(__FILE__).'/ipl_xml_request.php');
/**
* @author Jan Wehrs (jan.wehrs@billpay.de)
* @copyright Copyright 2010 Billpay GmbH
* @license commercial
*/
class ipl_calculate_rates_request extends ipl_xml_request {
var $_rate_params = array();
var $options;
var $_locale = array();
function get_options() {
return $this->options;
}
function set_rate_request_params($baseamount, $carttotalgross) {
$this->_rate_params['baseamount'] = $baseamount;
$this->_rate_params['carttotalgross'] = $carttotalgross;
}
function set_locale($country, $currency, $language) {
$this->_locale['country'] = $country;
$this->_locale['currency'] = $currency;
$this->_locale['language'] = $language;
}
function _send() {
return ipl_core_send_calculate_rates_request(
$this->_ipl_request_url,
$this->_default_params,
$this->_rate_params,
$this->_locale
);
}
function _process_response_xml($data) {
$this->options = $data['options'];
}
}
?>
@@ -0,0 +1,29 @@
<?php
require_once(dirname(__FILE__).'/ipl_xml_request.php');
/**
* @author Jan Wehrs (jan.wehrs@billpay.de)
* @copyright Copyright 2010 Billpay GmbH
* @license commercial
*/
class ipl_cancel_request extends ipl_xml_request {
var $_cancel_params = array();
function set_cancel_params($reference, $cart_total_gross, $currency) {
$this->_cancel_params['reference'] = $reference;
$this->_cancel_params['carttotalgross'] = $cart_total_gross;
$this->_cancel_params['currency'] = $currency;
}
function _send() {
return ipl_core_send_cancel_request($this->_ipl_request_url, $this->_default_params, $this->_cancel_params);
}
function _process_response_xml($data) {
}
}
?>
@@ -0,0 +1,83 @@
<?php
require_once(dirname(__FILE__).'/ipl_xml_request.php');
/**
* @author Jan Wehrs (jan.wehrs@billpay.de)
* @copyright Copyright 2010 Billpay GmbH
* @license commercial
*/
class ipl_capture_request extends ipl_xml_request {
var $_capture_params = array();
// bank account
var $account_holder;
var $account_number;
var $bank_code;
var $bank_name;
var $invoice_reference;
var $invoice_duedate;
var $standard_information_pdf;
var $email_attachment_pdf;
var $payment_info_html;
var $payment_info_plain;
function get_account_holder() {
return $this->account_holder;
}
function get_account_number() {
return $this->account_number;
}
function get_bank_code() {
return $this->bank_code;
}
function get_bank_name() {
return $this->bank_name;
}
function get_invoice_reference() {
return $this->invoice_reference;
}
function get_invoice_duedate() {
return $this->invoice_duedate;
}
function get_standard_information_pdf() {
return $this->standard_information_pdf;
}
function get_email_attachment_pdf() {
return $this->email_attachment_pdf;
}
function get_payment_info_html() {
return $this->payment_info_html;
}
function get_payment_info_plain() {
return $this->payment_info_plain;
}
function set_capture_params($bptid, $cart_total_gross, $currency, $reference, $customer_id) {
$this->_capture_params['bptid'] = $bptid;
$this->_capture_params['carttotalgross'] = $cart_total_gross;
$this->_capture_params['currency'] = $currency;
$this->_capture_params['reference'] = $reference;
$this->_capture_params['customerid'] = $customer_id;
}
function set_payment_info_params($showhtmlinfo, $showplaininfo) {
$this->_payment_info_params['htmlinfo'] = $showhtmlinfo ? "1" : "0";
$this->_payment_info_params['plaininfo'] = $showplaininfo ? "1" : "0";
}
function _send() {
return ipl_core_send_capture_request($this->_ipl_request_url, $this->_default_params, $this->_capture_params, $this->_payment_info_params);
}
function _process_response_xml($data) {
foreach ($data as $key => $value) {
$this->$key = $value;
}
}
}
?>
@@ -0,0 +1,82 @@
<?php
require_once(dirname(__FILE__).'/ipl_xml_request.php');
/**
* @author Jan Wehrs (jan.wehrs@billpay.de)
* @copyright Copyright 2010 Billpay GmbH
* @license commercial
*/
class ipl_edit_cart_content_request extends ipl_xml_request {
var $_totals = array();
var $_article_data = array();
var $due_update;
var $number_of_rates;
function get_due_update() {
return $this->due_update;
}
function get_number_of_rates() {
return $this->number_of_rates;
}
// ctr
function ipl_edit_cart_content_request($ipl_request_url) {
parent::ipl_xml_request($ipl_request_url);
}
function add_article($articleid, $articlequantity, $articlename, $articledescription,
$article_price, $article_price_gross) {
$article = array();
$article['articleid'] = $articleid;
$article['articlequantity'] = $articlequantity;
$article['articlename'] = $articlename;
$article['articledescription'] = $articledescription;
$article['articleprice'] = $article_price;
$article['articlepricegross'] = $article_price_gross;
$this->_article_data[] = $article;
}
function set_total($rebate, $rebate_gross, $shipping_name, $shipping_price,
$shipping_price_gross, $cart_total_price, $cart_total_price_gross,
$currency, $reference) {
$this->_totals['shippingname'] = $shipping_name;
$this->_totals['shippingprice'] = $shipping_price;
$this->_totals['shippingpricegross'] = $shipping_price_gross;
$this->_totals['rebate'] = $rebate;
$this->_totals['rebategross'] = $rebate_gross;
$this->_totals['carttotalprice'] = $cart_total_price;
$this->_totals['carttotalpricegross'] = $cart_total_price_gross;
$this->_totals['currency'] = $currency;
$this->_totals['reference'] = $reference;
}
function _send() {
$attributes = array();
return ipl_core_send_edit_cart_content_request(
$this->_ipl_request_url,
$this->_default_params,
$this->_totals,
$this->_article_data
);
}
function _process_response_xml($data) {
foreach ($data as $key => $value) {
$this->$key = $value;
}
}
function _process_error_response_xml($data) {
if (key_exists('status', $data)) {
$this->status = $data['status'];
}
}
}
?>
@@ -0,0 +1,84 @@
<?php
require_once(dirname(__FILE__).'/ipl_xml_request.php');
/**
* @author Jan Wehrs (jan.wehrs@billpay.de)
* @copyright Copyright 2010 Billpay GmbH
* @license commercial
*/
class ipl_invoice_created_request extends ipl_xml_request {
var $_invoice_params = array();
// bank account
var $account_holder;
var $account_number;
var $bank_code;
var $bank_name;
var $invoice_reference;
var $invoice_duedate;
var $activation_performed;
var $payment_info_html;
var $payment_info_plain;
var $dues;
function get_account_holder() {
return $this->account_holder;
}
function get_account_number() {
return $this->account_number;
}
function get_bank_code() {
return $this->bank_code;
}
function get_bank_name() {
return $this->bank_name;
}
function get_invoice_reference() {
return $this->invoice_reference;
}
function get_invoice_duedate() {
return $this->invoice_duedate;
}
function get_activation_performed() {
return $this->activation_performed;
}
function get_payment_info_html() {
return $this->payment_info_html;
}
function get_payment_info_plain() {
return $this->payment_info_plain;
}
function get_dues() {
return $this->dues;
}
function set_invoice_params($carttotalgross, $currency, $reference, $delayindays = 0) {
$this->_invoice_params['carttotalgross'] = $carttotalgross;
$this->_invoice_params['currency'] = $currency;
$this->_invoice_params['reference'] = $reference;
$this->_invoice_params['delayindays'] = $delayindays;
}
function set_payment_info_params($showhtmlinfo, $showplaininfo) {
$this->_payment_info_params['htmlinfo'] = $showhtmlinfo ? "1" : "0";
$this->_payment_info_params['plaininfo'] = $showplaininfo ? "1" : "0";
}
function _send() {
return ipl_core_send_invoice_request($this->_ipl_request_url, $this->_default_params, $this->_invoice_params, $this->_payment_info_params);
}
function _process_response_xml($data) {
foreach ($data as $key => $value) {
$this->$key = $value;
}
}
}
?>
@@ -0,0 +1,114 @@
<?php
require_once(dirname(__FILE__).'/ipl_xml_request.php');
/**
* @author Jan Wehrs (jan.wehrs@billpay.de)
* @copyright Copyright 2010 Billpay GmbH
* @license commercial
*/
class ipl_module_config_request extends ipl_xml_request {
var $invoicestatic = 0;
var $directdebitstatic = 0;
var $hirepurchasestatic = 0;
var $invoicebusinessstatic = 0;
var $invoicemin = 0;
var $directdebitmin = 0;
var $hirepurchasemin = 0;
var $invoicebusinessmin = 0;
var $active = false;
var $invoiceallowed = false;
var $directdebitallowed = false;
var $hirepurchaseallowed = false;
var $invoicebusinessallowed = false;
var $terms = array();
var $_locale = array();
function is_active() {
return $this->active;
}
function is_invoice_allowed() {
return $this->invoiceallowed;
}
function is_invoicebusiness_allowed() {
return $this->invoicebusinessallowed;
}
function is_direct_debit_allowed() {
return $this->directdebitallowed;
}
function is_hire_purchase_allowed() {
return $this->hirepurchaseallowed;
}
function get_invoice_min_value() {
return $this->invoicemin;
}
function get_invoicebusiness_min_value() {
return $this->invoicebusinessmin;
}
function get_direct_debit_min_value() {
return $this->directdebitmin;
}
function get_hire_purchase_min_value() {
return $this->hirepurchasemin;
}
function get_static_limit_invoice() {
return $this->invoicestatic;
}
function get_static_limit_invoicebusiness() {
return $this->invoicebusinessstatic;
}
function get_static_limit_direct_debit() {
return $this->directdebitstatic;
}
function get_static_limit_hire_purchase() {
return $this->hirepurchasestatic;
}
function get_terms() {
return $this->terms;
}
function get_config_data() {
return array(
'is_active' => $this->is_active(),
'is_allowed_invoice' => $this->is_invoice_allowed(),
'is_allowed_invoicebusiness' => $this->is_invoicebusiness_allowed(),
'is_allowed_directdebit' => $this->is_direct_debit_allowed(),
'is_allowed_transactioncredit' => $this->is_hire_purchase_allowed(),
'minvalue_invoice' => $this->get_invoice_min_value(),
'minvalue_invoicebusiness' => $this->get_invoicebusiness_min_value(),
'minvalue_directdebit' => $this->get_direct_debit_min_value(),
'minvalue_transactioncredit' => $this->get_hire_purchase_min_value(),
'maxvalue_invoice' => $this->get_static_limit_invoice(),
'maxvalue_invoicebusiness' => $this->get_static_limit_invoicebusiness(),
'maxvalue_directdebit' => $this->get_static_limit_direct_debit(),
'maxvalue_transactioncredit' => $this->get_static_limit_hire_purchase()
);
}
function _process_response_xml($data) {
foreach ($data as $key => $value) {
$this->$key = $value;
}
}
function set_locale($country, $currency, $language) {
$this->_locale['country'] = $country;
$this->_locale['currency'] = $currency;
$this->_locale['language'] = $language;
}
function _send() {
return ipl_core_send_module_config_request(
$this->_ipl_request_url,
$this->_default_params,
$this->_locale
);
}
}
?>
@@ -0,0 +1,64 @@
<?php
require_once(dirname(__FILE__).'/ipl_xml_request.php');
/**
* @author Jan Wehrs (jan.wehrs@billpay.de)
* @copyright Copyright 2010 Billpay GmbH
* @license commercial
*/
class ipl_partialcancel_request extends ipl_xml_request {
var $_cancel_params = array();
var $_canceled_articles = array();
var $due_update;
var $number_of_rates;
function is_transaction_credit_order() {
return $this->due_update;
}
function get_due_update() {
return $this->due_update;
}
function get_number_of_rates() {
return $this->number_of_rates;
}
function set_cancel_params($reference, $rebatedecrease, $rebatedecreasegross, $shippingdecrease, $shippingdecreasegross, $currency) {
$this->_cancel_params['reference'] = $reference;
$this->_cancel_params['rebatedecrease'] = $rebatedecrease;
$this->_cancel_params['rebatedecreasegross'] = $rebatedecreasegross;
$this->_cancel_params['shippingdecrease'] = $shippingdecrease;
$this->_cancel_params['shippingdecreasegross'] = $shippingdecreasegross;
$this->_cancel_params['currency'] = $currency;
}
function add_canceled_article($articleid, $articlequantity) {
$article = array();
$article['articleid'] = $articleid;
$article['articlequantity'] = $articlequantity;
$this->_canceled_articles[] = $article;
}
function _send() {
return ipl_core_send_partialcancel_request(
$this->_ipl_request_url,
$this->_default_params,
$this->_cancel_params,
$this->_canceled_articles
);
}
function _process_response_xml($data) {
foreach ($data as $key => $value) {
$this->$key = $value;
}
}
}
?>
@@ -0,0 +1,276 @@
<?php
require_once(dirname(__FILE__).'/ipl_xml_request.php');
/**
* @author Jan Wehrs (jan.wehrs@billpay.de)
* @copyright Copyright 2010 Billpay GmbH
* @license commercial
*/
class ipl_preauthorize_request extends ipl_xml_request {
var $_customer_details = array();
var $_shippping_details = array();
var $_totals = array();
var $_bank_account = array();
var $_rate_request_data = array();
var $_article_data = array();
var $_order_history_data = array();
var $_company_details = array();
var $_payment_type;
var $status;
var $bptid;
var $corrected_street;
var $corrected_street_no;
var $corrected_zip;
var $corrected_city;
var $corrected_country;
// parameters needed for auto-capture
var $account_holder;
var $account_number;
var $bank_code;
var $bank_name;
var $invoice_reference;
var $invoice_duedate;
var $_terms_accepted = false;
var $_capture_request_necessary = true;
var $_expected_days_till_shipping = 0;
var $standard_information_pdf;
var $email_attachment_pdf;
var $payment_info_html;
var $payment_info_plain;
// ctr
function ipl_preauthorize_request($ipl_request_url, $payment_type) {
$this->_payment_type = $payment_type;
parent::ipl_xml_request($ipl_request_url);
}
function get_terms_accepted() {
return $this->_terms_accepted;
}
function set_terms_accepted($val) {
$this->_terms_accepted = $val;
}
function set_expected_days_till_shipping($val) {
$this->_expected_days_till_shipping = $val;
}
function set_capture_request_necessary($val) {
$this->_capture_request_necessary = $val;
}
function get_expected_days_till_shipping() {
return $this->_expected_days_till_shipping;
}
function get_capture_request_nesessary() {
return $this->_capture_request_necessary;
}
function get_payment_type() {
return $this->_payment_type;
}
function get_status() {
return $this->status;
}
function get_bptid() {
return $this->bptid;
}
function get_corrected_street() {
return $this->corrected_street;
}
function get_corrected_street_no() {
return $this->corrected_street_no;
}
function get_corrected_zip() {
return $this->corrected_zip;
}
function get_corrected_city() {
return $this->corrected_city;
}
function get_corrected_country() {
return $this->corrected_country;
}
function get_account_holder() {
return $this->account_holder;
}
function get_account_number() {
return $this->account_number;
}
function get_bank_code() {
return $this->bank_code;
}
function get_bank_name() {
return $this->bank_name;
}
function get_invoice_reference() {
return $this->invoice_reference;
}
function get_invoice_duedate() {
return $this->invoice_duedate;
}
function get_standard_information_pdf() {
return $this->standard_information_pdf;
}
function get_email_attachment_pdf() {
return $this->email_attachment_pdf;
}
function get_payment_info_html() {
return $this->payment_info_html;
}
function get_payment_info_plain() {
return $this->payment_info_plain;
}
function set_customer_details($customer_id, $customer_type, $salutation, $title,
$first_name, $last_name, $street, $street_no, $address_addition, $zip,
$city, $country, $email, $phone, $cell_phone, $birthday, $language, $ip, $customerGroup) {
$this->_customer_details['customerid'] = $customer_id;
$this->_customer_details['customertype'] = $customer_type;
$this->_customer_details['salutation'] = $salutation;
$this->_customer_details['title'] = $title;
$this->_customer_details['firstName'] = $first_name;
$this->_customer_details['lastName'] = $last_name;
$this->_customer_details['street'] = $street;
$this->_customer_details['streetNo'] = $street_no;
$this->_customer_details['addressAddition'] = $address_addition;
$this->_customer_details['zip'] = $zip;
$this->_customer_details['city'] = $city;
$this->_customer_details['country'] = $country;
$this->_customer_details['email'] = $email;
$this->_customer_details['phone'] = $phone;
$this->_customer_details['cellPhone'] = $cell_phone;
$this->_customer_details['birthday'] = $birthday;
$this->_customer_details['language'] = $language;
$this->_customer_details['ip'] = $ip;
$this->_customer_details['customerGroup'] = $customerGroup;
}
function set_shipping_details($use_billing_address, $salutation=null, $title=null, $first_name=null, $last_name=null,
$street=null, $street_no=null, $address_addition=null, $zip=null, $city=null, $country=null, $phone=null, $cell_phone=null) {
$this->_shippping_details['useBillingAddress'] = $use_billing_address ? '1' : '0';
$this->_shippping_details['salutation'] = $salutation;
$this->_shippping_details['title'] = $title;
$this->_shippping_details['firstName'] = $first_name;
$this->_shippping_details['lastName'] = $last_name;
$this->_shippping_details['street'] = $street;
$this->_shippping_details['streetNo'] = $street_no;
$this->_shippping_details['addressAddition'] = $address_addition;
$this->_shippping_details['zip'] = $zip;
$this->_shippping_details['city'] = $city;
$this->_shippping_details['country'] = $country;
$this->_shippping_details['phone'] = $phone;
$this->_shippping_details['cellPhone'] = $cell_phone;
}
function add_article($articleid, $articlequantity, $articlename, $articledescription,
$article_price, $article_price_gross) {
$article = array();
$article['articleid'] = $articleid;
$article['articlequantity'] = $articlequantity;
$article['articlename'] = $articlename;
$article['articledescription'] = $articledescription;
$article['articleprice'] = $article_price;
$article['articlepricegross'] = $article_price_gross;
$this->_article_data[] = $article;
}
function add_order_history($horderid, $hdate, $hamount, $hcurrency, $hpaymenttype, $hstatus) {
$histOrder = array();
$histOrder['horderid'] = $horderid;
$histOrder['hdate'] = $hdate;
$histOrder['hamount'] = $hamount;
$histOrder['hcurrency'] = $hcurrency;
$histOrder['hpaymenttype'] = $hpaymenttype;
$histOrder['hstatus'] = $hstatus;
$this->_order_history_data[] = $histOrder;
}
function set_total($rebate, $rebate_gross, $shipping_name, $shipping_price,
$shipping_price_gross, $cart_total_price, $cart_total_price_gross,
$currency, $reference) {
$this->_totals['shippingname'] = $shipping_name;
$this->_totals['shippingprice'] = $shipping_price;
$this->_totals['shippingpricegross'] = $shipping_price_gross;
$this->_totals['rebate'] = $rebate;
$this->_totals['rebategross'] = $rebate_gross;
$this->_totals['carttotalprice'] = $cart_total_price;
$this->_totals['carttotalpricegross'] = $cart_total_price_gross;
$this->_totals['currency'] = $currency;
$this->_totals['reference'] = $reference;
}
function set_bank_account($account_holder, $account_number, $sort_code) {
$this->_bank_account['accountholder'] = $account_holder;
$this->_bank_account['accountnumber'] = $account_number;
$this->_bank_account['sortcode'] = $sort_code;
}
function set_company_details($name, $legalForm, $registerNumber, $holderName, $taxNumber) {
$this->_company_details['name'] = $name;
$this->_company_details['legalForm'] = $legalForm;
$this->_company_details['registerNumber'] = $registerNumber;
$this->_company_details['holderName'] = $holderName;
$this->_company_details['taxNumber'] = $taxNumber;
}
function set_rate_request($rate_count, $total_amount) {
$this->_rate_request_data['ratecount'] = $rate_count;
$this->_rate_request_data['totalamount'] = $total_amount;
}
function set_payment_info_params($showhtmlinfo, $showplaininfo) {
$this->_payment_info_params['htmlinfo'] = $showhtmlinfo ? "1" : "0";
$this->_payment_info_params['plaininfo'] = $showplaininfo ? "1" : "0";
}
function _send() {
$attributes = array();
$attributes['tcaccepted'] = $this->_terms_accepted;
$attributes['expecteddaystillshipping'] = $this->_expected_days_till_shipping;
$attributes['capturerequestnecessary'] = $this->_capture_request_necessary;
$attributes['paymenttype'] = $this->_payment_type;
return ipl_core_send_preauthorize_request(
$this->_ipl_request_url,
$attributes,
$this->_default_params,
$this->_customer_details,
$this->_shippping_details,
$this->_bank_account,
$this->_totals,
$this->_article_data,
$this->_order_history_data,
$this->_rate_request_data,
$this->_company_details,
$this->_payment_info_params
);
}
function _process_response_xml($data) {
foreach ($data as $key => $value) {
$this->$key = $value;
}
}
function _process_error_response_xml($data) {
if (key_exists('status', $data)) {
$this->status = $data['status'];
}
}
}
?>
@@ -0,0 +1,44 @@
<?php
require_once(dirname(__FILE__).'/ipl_xml_request.php');
/**
* @author Jan Wehrs (jan.wehrs@billpay.de)
* @copyright Copyright 2010 Billpay GmbH
* @license commercial
*/
class ipl_update_order_request extends ipl_xml_request {
var $_update_params = array();
var $_id_update_list = array();
function add_id_update($articleid, $updateid) {
$idUpdate = array();
$idUpdate['articleid'] = $articleid;
$idUpdate['updateid'] = $updateid;
$this->_id_update_list[] = $idUpdate;
}
function set_update_params($bptid, $reference) {
$this->_update_params['bptid'] = $bptid;
$this->_update_params['reference'] = $reference;
}
function _send() {
return ipl_core_send_update_order_request(
$this->_ipl_request_url,
$this->_default_params,
$this->_update_params,
$this->_id_update_list
);
}
function _process_response_xml($data) {
foreach ($data as $key => $value) {
$this->$key = $value;
}
}
}
?>
@@ -0,0 +1,68 @@
<?php
require_once(dirname(__FILE__).'/ipl_xml_request.php');
/**
* @author Jan Wehrs (jan.wehrs@billpay.de)
* @copyright Copyright 2010 Billpay GmbH
* @license commercial
*/
class ipl_validation_request extends ipl_xml_request {
var $_customer_details = array();
var $_shippping_details = array();
function set_customer_details($customer_id, $customer_type, $salutation, $title,
$first_name, $last_name, $street, $street_no, $address_addition, $zip,
$city, $country, $email, $phone, $cell_phone, $birthday, $language, $ip) {
$this->_customer_details['customerid'] = $customer_id;
$this->_customer_details['customertype'] = $customer_type;
$this->_customer_details['salutation'] = $salutation;
$this->_customer_details['title'] = $title;
$this->_customer_details['firstName'] = $first_name;
$this->_customer_details['lastName'] = $last_name;
$this->_customer_details['street'] = $street;
$this->_customer_details['streetNo'] = $street_no;
$this->_customer_details['addressAddition'] = $address_addition;
$this->_customer_details['zip'] = $zip;
$this->_customer_details['city'] = $city;
$this->_customer_details['country'] = $country;
$this->_customer_details['email'] = $email;
$this->_customer_details['phone'] = $phone;
$this->_customer_details['cellPhone'] = $cell_phone;
$this->_customer_details['birthday'] = $birthday;
$this->_customer_details['language'] = $language;
$this->_customer_details['ip'] = $ip;
}
function set_shipping_details($use_billing_address, $salutation=null, $title=null, $first_name=null, $last_name=null,
$street=null, $street_no=null, $address_addition=null, $zip=null, $city=null, $country=null, $phone=null, $cell_phone=null) {
$this->_shippping_details['useBillingAddress'] = $use_billing_address ? '1' : '0';
$this->_shippping_details['salutation'] = $salutation;
$this->_shippping_details['title'] = $title;
$this->_shippping_details['firstName'] = $first_name;
$this->_shippping_details['lastName'] = $last_name;
$this->_shippping_details['street'] = $street;
$this->_shippping_details['streetNo'] = $street_no;
$this->_shippping_details['addressAddition'] = $address_addition;
$this->_shippping_details['zip'] = $zip;
$this->_shippping_details['city'] = $city;
$this->_shippping_details['country'] = $country;
$this->_shippping_details['phone'] = $phone;
$this->_shippping_details['cellPhone'] = $cell_phone;
}
function _send() {
return ipl_core_send_validation_request($this->_ipl_request_url, $this->_default_params, $this->_customer_details, $this->_shippping_details);
}
function _process_response_xml($data) {
// Nothing to do here
}
}
?>
+110
View File
@@ -0,0 +1,110 @@
<?php
/**
* @author Jan Wehrs (jan.wehrs@billpay.de)
* @copyright Copyright 2010 Billpay GmbH
* @license commercial
*/
class ipl_xml_request {
var $request_xml = '';
var $response_xml = '';
var $_ipl_request_url = '';
var $_default_params = array();
var $_status_info = array();
var $_username;
var $_password;
function has_error() {
return $this->_status_info['error_code'] > 0;
}
function get_error_code() {
return $this->_status_info['error_code'];
}
function get_customer_error_message() {
return $this->_status_info['customer_message'];
}
function get_merchant_error_message() {
return $this->_status_info['merchant_message'];
}
function get_request_xml() {
return $this->request_xml;
}
function get_response_xml() {
return $this->response_xml;
}
function ipl_xml_request($ipl_request_url) {
$this->_ipl_request_url = $ipl_request_url;
}
function set_default_params($mid, $pid, $bpsecure) {
$this->_default_params['mid'] = $mid;
$this->_default_params['pid'] = $pid;
$this->_default_params['bpsecure'] = $bpsecure;
}
function set_basic_auth_params($username, $password) {
$this->_username = $username;
$this->_password = $password;
}
/**
* This must be overridden in deriving class
*
* @return unknown
*/
function _send() {
return false;
}
/**
* This must be overridden in deriving class
* @return unknown
*/
function _process_response_xml($data) {
}
/**
* This must be overridden in deriving class
* @return unknown
*/
function _process_error_response_xml($data) {
}
function get_internal_error_msg() {
return ipl_core_get_internal_error_msg();
}
function send() {
$res = $this->_send();
if (!$res || ipl_core_has_internal_error()) {
return array('error_code' => ipl_core_get_internal_error(),
'error_message' => ipl_core_get_internal_error_msg());
}
// Get status info data structure
$this->_status_info = ipl_core_get_api_error_info();
$this->request_xml = $res[0];
$this->response_xml = $res[1];
if (!ipl_core_has_api_error()) {
$this->_process_response_xml($res[2]);
}
else {
$this->_process_error_response_xml($res[2]);
}
}
}
?>