本文整理汇总了PHP中SoapClient::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP SoapClient::delete方法的具体用法?PHP SoapClient::delete怎么用?PHP SoapClient::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoapClient
的用法示例。
在下文中一共展示了SoapClient::delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SoapClient
<?php
// Llamar al método como si fuera del cliente
$cliente = new SoapClient(null, array('location' => 'http://localhost/users/ws/service.php', 'uri' => 'urn:webservices'));
if ($_POST["option"] == "insert") {
echo $cliente->insert($_POST);
} else {
if ($_POST["option"] == "list") {
echo $cliente->listUser();
} else {
if ($_POST["option"] == "delete") {
echo $cliente->delete($_POST);
} else {
if ($_POST["option"] == "select") {
echo $cliente->select($_POST);
} else {
if ($_POST["option"] == "update") {
echo $cliente->update($_POST);
}
}
}
}
}
示例2: SoapClient
<?php
$soapURL = "http://localhost:8080/ws/services/AssetOperationService?wsdl";
$client = new SoapClient($soapURL, array('trace' => 1, 'location' => str_replace('?wsdl', '', $soapURL)));
$auth = array('username' => 'admin', 'password' => 'admin');
$identifier = array('path' => array('path' => '/my-xml-block', 'siteName' => 'nameOfSite'), 'type' => 'block');
$deleteParams = array('authentication' => $auth, 'identifier' => $identifier);
$reply = $client->delete($deleteParams);
if ($reply->deleteReturn->success == 'true') {
echo "Success.";
} else {
echo "Error occurred when deleting: " . $reply->deleteReturn->message;
}
示例3: cancel
public function cancel(Varien_Object $payment)
{
$session = Mage::getSingleton('adminhtml/session');
if (Mage::app()->getRequest()->getActionName() == 'save') {
$order = $payment->getOrder();
$_totalDatas = $order->getData();
$childOrder = Mage::getModel('sales/order')->loadByIncrementId($_totalDatas['relation_child_real_id']);
if ($childOrder->getBaseGrandTotal() <= $order->getBaseGrandTotal()) {
$childPayment = $childOrder->getPayment();
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
$write->query('update epay_order_status set orderid = "' . $_totalDatas['relation_child_real_id'] . '" WHERE orderid = "' . $order->getIncrementId() . '"');
$transactionId = $payment->getParentTransactionId();
$childPayment->setTransactionId($transactionId)->setIsTransactionClosed(0);
$transaction = $childPayment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH);
$transaction->setAdditionalInformation("Transaction ID", $transactionId);
$transaction->save();
} else {
$session->addError("The transaction could not be moved because the amount of the edited order exceeds the transaction amount - Go to the ePay administration to handle the payment manually.");
}
return;
}
//
// Verify if remote interface is enabled
//
if ((int) $this->getConfigData('remoteinterface', $payment->getOrder() ? $payment->getOrder()->getStoreId() : null) != 1) {
$this->addOrderComment($payment->getOrder(), Mage::helper('epay')->__('EPAY_LABEL_75'));
return;
}
try {
//
// Read info directly from the database
//
$read = Mage::getSingleton('core/resource')->getConnection('core_read');
$row = $read->fetchRow("select * from epay_order_status where orderid = '" . $payment->getOrder()->getIncrementId() . "'");
if ($row["status"] == '1') {
$tid = $row["tid"];
$param = array('merchantnumber' => $this->getConfigData('merchantnumber', $payment->getOrder() ? $payment->getOrder()->getStoreId() : null), 'transactionid' => $tid, 'group' => '', 'epayresponse' => 0, 'pwd' => $this->getConfigData('remoteinterfacepassword', $payment->getOrder() ? $payment->getOrder()->getStoreId() : null));
$client = new SoapClient('https://ssl.ditonlinebetalingssystem.dk/remote/payment.asmx?WSDL');
$result = $client->delete($param);
if ($result->deleteResult == 1) {
//
// Success - transaction deleted!
//
$this->addOrderComment($payment->getOrder(), "Transaction deleted with transaction id: " . $tid);
$payment->getOrder()->save();
} else {
if ($result->epayresponse != -1) {
if ($result->epayresponse == -1002) {
$this->addOrderComment($payment->getOrder(), "Transaction could not be deleted by ePay: " . $result->epayresponse . ". Forretningsnummeret findes ikke.");
throw new Exception("Transaction could not be deleted by ePay: " . $result->epayresponse . ". Forretningsnummeret findes ikke.");
} elseif ($result->epayresponse == -1003 || $result->epayresponse == -1006) {
$this->addOrderComment($payment->getOrder(), "Transaction could not be captured by ePay: " . $result->epayresponse . ". Der er ikke adgang til denne funktion (API / Remote Interface).");
throw new Exception("Transaction could not be deleted by ePay: " . $result->epayresponse . ". Der er ikke adgang til denne funktion (API / Remote Interface).");
} else {
$this->addOrderComment($payment->getOrder(), 'Transaction could not be deleted by ePay: ' . $result->epayresponse . '. ' . $this->getEpayErrorText($result->epayresponse));
throw new Exception('Transaction could not be deleted by ePay: ' . $result->epayresponse . '. ' . $this->getEpayErrorText($result->epayresponse));
}
} else {
throw new Exception('Unknown response from ePay: ' . $result->epayresponse);
}
}
} elseif ($row["status"] == '0') {
//
// Do nothing - the order is to be canceled without any communication to ePay
//
} else {
//
// Somehow the order was not found - this must be an error!
//
throw new Exception("Order not found - please check the epay_order_status table!");
}
} catch (Exception $e) {
$session->addException($e, $e->getMessage() . " - Go to the ePay administration to credit the payment manually.");
}
}
示例4: cancel
public function cancel(Varien_Object $payment)
{
$session = Mage::getSingleton('adminhtml/session');
if (Mage::app()->getRequest()->getActionName() == 'save') {
return;
}
//
// Verify if remote interface is enabled
//
if ((int) $this->getConfigData('remoteinterface', $payment->getOrder() ? $payment->getOrder()->getStoreId() : null) != 1) {
$this->addOrderComment($payment->getOrder(), Mage::helper('epay')->__('EPAY_LABEL_75'));
return;
}
try {
//
// Read info directly from the database
//
$read = Mage::getSingleton('core/resource')->getConnection('core_read');
$row = $read->fetchRow("select * from epay_order_status where orderid = '" . $payment->getOrder()->getIncrementId() . "'");
if ($row["status"] == '1') {
$tid = $row["tid"];
$param = array('merchantnumber' => $this->getConfigData('merchantnumber', $payment->getOrder() ? $payment->getOrder()->getStoreId() : null), 'transactionid' => $tid, 'group' => '', 'epayresponse' => 0, 'pwd' => $this->getConfigData('remoteinterfacepassword', $payment->getOrder() ? $payment->getOrder()->getStoreId() : null));
$client = new SoapClient('https://ssl.ditonlinebetalingssystem.dk/remote/payment.asmx?WSDL');
$result = $client->delete($param);
if ($result->deleteResult == 1) {
//
// Success - transaction deleted!
//
$this->addOrderComment($payment->getOrder(), "Transaction deleted with transaction id: " . $tid);
$payment->getOrder()->save();
} else {
if ($result->epayresponse != -1) {
if ($result->epayresponse == -1002) {
$this->addOrderComment($payment->getOrder(), "Transaction could not be deleted by ePay: " . $result->epayresponse . ". Forretningsnummeret findes ikke.");
throw new Exception("Transaction could not be deleted by ePay: " . $result->epayresponse . ". Forretningsnummeret findes ikke.");
} elseif ($result->epayresponse == -1003 || $result->epayresponse == -1006) {
$this->addOrderComment($payment->getOrder(), "Transaction could not be captured by ePay: " . $result->epayresponse . ". Der er ikke adgang til denne funktion (API / Remote Interface).");
throw new Exception("Transaction could not be deleted by ePay: " . $result->epayresponse . ". Der er ikke adgang til denne funktion (API / Remote Interface).");
} else {
$this->addOrderComment($payment->getOrder(), 'Transaction could not be deleted by ePay: ' . $result->epayresponse . '. ' . $this->getEpayErrorText($result->epayresponse));
throw new Exception('Transaction could not be deleted by ePay: ' . $result->epayresponse . '. ' . $this->getEpayErrorText($result->epayresponse));
}
} else {
throw new Exception('Unknown response from ePay: ' . $result->epayresponse);
}
}
} elseif ($row["status"] == '0') {
//
// Do nothing - the order is to be canceled without any communication to ePay
//
} else {
//
// Somehow the order was not found - this must be an error!
//
throw new Exception("Order not found - please check the epay_order_status table!");
}
} catch (Exception $e) {
$session->addException($e, $e->getMessage() . " - Go to the ePay administration to credit the payment manually.");
}
}