當前位置: 首頁>>代碼示例>>PHP>>正文


PHP soapclient::getDebug方法代碼示例

本文整理匯總了PHP中soapclient::getDebug方法的典型用法代碼示例。如果您正苦於以下問題:PHP soapclient::getDebug方法的具體用法?PHP soapclient::getDebug怎麽用?PHP soapclient::getDebug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在soapclient的用法示例。


在下文中一共展示了soapclient::getDebug方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: isset

 *	Payload: rpc/literal
 *	Transport: http
 *	Authentication: none
 */
require_once 'f:/nusoap/lib/nusoap.php';
$proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
$proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
$proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
$proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';
echo '<h2>Constructor</h2>';
$client = new soapclient('http://www.scottnichol.com/samples/session.php?wsdl', true, $proxyhost, $proxyport, $proxyusername, $proxypassword);
$err = $client->getError();
if ($err) {
    echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
$client->clearDebug();
// A persistent connection is *optional*, *not* necessary
$client->useHTTPPersistentConnection();
echo '<h2>GetSessionID</h2>';
$result = $client->call('GetSessionID', array());
// Check for a fault
if ($client->fault) {
    echo '<h2>Fault</h2><pre>';
    print_r($result);
    echo '</pre>';
} else {
    // Check for errors
    $err = $client->getError();
    if ($err) {
        // Display the error
開發者ID:Nemeziz,項目名稱:nusoap-for-php5,代碼行數:31,代碼來源:wsdlclient13.php

示例2: array

 function do_bill($amount, $title, $products, $u, $invoice)
 {
     global $db, $config;
     $product = $products[0];
     $payment_id = $invoice;
     require_once 'lib/nusoap.php';
     if ($this->config['testmode']) {
         $url = "https://sandbox.api.bidpay.com/ThirdPartyPayment/v1/ThirdPartyPaymentService.asmx";
     } else {
         $url = "https://api.bidpay.com/ThirdPartyPayment/v1/ThirdPartyPaymentService.asmx";
     }
     $item = array('ItemNumber' => $product['product_id'], 'ItemDescription' => $product['title'], 'ItemType' => 'WebsitePurchase', 'Site' => $config['site_title'], 'Amount' => $amount, 'ShippingAmount' => '0');
     $items['Item'] = $item;
     $vars = array('SellerToken' => $this->config['token'], 'ReferenceNumber' => $payment_id, 'AuctionBuyerID' => $member_id, 'Items' => $items, 'ReturnUrl' => $config['root_url'] . "/plugins/payment/bidpay/thanks.php");
     $client = new soapclient($url . "?WSDL", true);
     $err = $client->getError();
     if ($err) {
         if ($this->config['testmode']) {
             $db->log_error("BidPay ERROR. Response: " . $client->response);
         }
         if ($this->config['testmode']) {
             echo "<pre>" . $client->getDebug() . "</pre>";
         }
         return "Error: " . $err;
     }
     $uuidMessageID = NewUuid();
     $uuidTimestamp = NewUuid();
     $uuidSecurityToken = NewUuid();
     $nonce = "RqjH7M+gwhx6vTL/QgJK2A==";
     $now = time();
     $created = GetUtc8601($now);
     $now = time() + 60 * 5;
     $expires = GetUtc8601($now);
     $headers = array();
     $headers[] = "<wsa:Action>http://api.bidpay.com/ThirdPartyPayment/v1/Methods/PaymentRequest</wsa:Action>";
     $headers[] = "<wsa:MessageID>urn:uuid:" . $uuidMessageID . "</wsa:MessageID>";
     $headers[] = "<wsa:ReplyTo>";
     $headers[] = "<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>";
     $headers[] = "</wsa:ReplyTo>";
     $headers[] = "<wsa:To>" . $url . "</wsa:To>";
     $headers[] = "<wsse:Security soap:mustUnderstand=\"1\">";
     $headers[] = "<wsu:Timestamp wsu:Id=\"Timestamp-{$uuidTimestamp}\">";
     $headers[] = "<wsu:Created>{$created}</wsu:Created>";
     $headers[] = "<wsu:Expires>{$expires}</wsu:Expires>";
     $headers[] = "</wsu:Timestamp>";
     $headers[] = "<wsse:UsernameToken xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" wsu:Id=\"SecurityToken-" . $uuidSecurityToken . "\">";
     $headers[] = "<wsse:Username>" . $this->config['username'] . "</wsse:Username>";
     $headers[] = "<wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">" . $this->config['password'] . "</wsse:Password>";
     //$headers[] = "<wsse:Nonce>".$nonce."</wsse:Nonce>";
     $headers[] = "<wsu:Created>" . $created . "</wsu:Created>";
     $headers[] = "</wsse:UsernameToken>";
     $headers[] = "</wsse:Security>";
     $headers = implode("\n", $headers);
     $result = $client->call('ThirdPartyPayment', array('thirdPartyPaymentRequest' => $vars), '', '', $headers);
     if ($client->fault) {
         if ($this->config['testmode']) {
             $db->log_error("BidPay ERROR. Response: " . $client->response);
         }
         if ($this->config['testmode']) {
             echo "<pre>" . $client->getDebug() . "</pre>";
         }
         return "Soap Request Fault [" . $client->getError() . "]";
     } else {
         $err = $client->getError();
         if ($err) {
             if ($this->config['testmode']) {
                 $db->log_error("BidPay ERROR. Response: " . $client->response);
             }
             if ($this->config['testmode']) {
                 echo "<pre>" . $client->getDebug() . "</pre>";
             }
             return "Error " . $err;
         } else {
             /*
             TransactionID This is the ID assigned to the transaction by BidPay.
             ReferenceNumber This is the value supplied by the third party in the request.
             PaymentURL This is the URL to which the buyer should be redirected to complete the checkout process.
             */
         }
     }
 }
開發者ID:subashemphasize,項目名稱:test_site,代碼行數:81,代碼來源:bidpay.inc.php


注:本文中的soapclient::getDebug方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。