Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: Cyber_source.php
<?php // Before using this example, replace the generic values with your merchant ID and password. define( 'MERCHANT_ID', $api_key ); // farooq_dev define( 'TRANSACTION_KEY', 'B6Rqx4N4t+lBtpOYmqjgmyyOExM/oLsc3gET/G6fzoBTS16WuFFyXyS549HNJvkmB4H4vaKPkKcfY7Qx+K0ossBaZsUrryID8mQw27vzzg1mHzDtGxIiNvenGBygQgL9zUupQeVGgySo1cGngO4eoI6AOIOyK/w3fsoAnhAXB6i26QCpmU2CfFft4iMgRNvKqSIjhE0YaJRnVeGXKkqXbtCbaUob1Ey1mqbHhMl+nlV685oNPF9N0XV/Fh1O5YvlcgvyFg/BnF+4TSS8/XUPNJ5kHHEYcOTFnNhxVJxwJUTTz+iZNh6yk/FxdNaL2BfJ0OdPGwX94KtD7Put3V+YAg==' ); // // $secret_key define( 'WSDL_URL', 'https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.26.wsdl' ); class ExtendedClient extends SoapClient { function __construct($wsdl, $options = null) { parent::__construct($wsdl, $options); } // This section inserts the UsernameToken information in the outgoing SOAP message. function __doRequest($request, $location, $action, $version) { $user = MERCHANT_ID; $password = TRANSACTION_KEY; $soapHeader = "<SOAP-ENV:Header xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\"><wsse:Security SOAP-ENV:mustUnderstand=\"1\"><wsse:UsernameToken><wsse:Username>$user</wsse:Username><wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">$password</wsse:Password></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header>"; $requestDOM = new DOMDocument('1.0'); $soapHeaderDOM = new DOMDocument('1.0'); try { $requestDOM->loadXML($request); $soapHeaderDOM->loadXML($soapHeader); $node = $requestDOM->importNode($soapHeaderDOM->firstChild, true); $requestDOM->firstChild->insertBefore( $node, $requestDOM->firstChild->firstChild); $request = $requestDOM->saveXML(); // printf( "Modified Request:\n*$request*\n" ); } catch (DOMException $e) { die( 'Error adding UsernameToken: ' . $e->code); } return parent::__doRequest($request, $location, $action, $version, null); } }