README
'https:///firstpay_integration/public/FapxConnect.xml', * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_TRACE => true, * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_LOGIN => 'you_secret_login', * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_PASSWORD => 'you_secret_password', * ); * 等等... require_once __DIR__ . '/vendor/autoload.php'; /** * 最小选项 */ $options = array( \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_URL => 'https:///firstpay_integration/public/FapxConnect.xml', \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_CLASSMAP => ClassMap::get(), ); /** * Get ServiceType 的示例 */ $get = new \ServiceType\Get($options); $get->setSoapHeaderXHeader(new \StructType\XHeader()); /** * GetTransactionUpdateXml 操作/方法的示例调用 */ if ($get->GetTransactionUpdateXml(new \StructType\GetTransactionUpdateXml()) !== false) { print_r($get->getResult()); } else { print_r($get->getLastError()); } /** * GetTransactionUpdateList 操作/方法的示例调用 */ if ($get->GetTransactionUpdateList(new \StructType\GetTransactionUpdateList()) !== false) { print_r($get->getResult()); } else { print_r($get->getLastError()); } /** * GetTransaction 操作/方法的示例调用 */ if ($get->GetTransaction(new \StructType\GetTransaction()) !== false) { print_r($get->getResult()); } else { print_r($get->getLastError()); } /** * Send ServiceType 的示例 */ $send = new \ServiceType\Send($options); $send->setSoapHeaderXHeader(new \StructType\XHeader()); /** * SendPaymentList 操作/方法的示例调用 */ if ($send->SendPaymentList(new \StructType\SendPaymentList()) !== false) { print_r($send->getResult()); } else { print_r($send->getLastError()); } /** * SendTransactionsList 操作/方法的示例调用 */ if ($send->SendTransactionsList(new \StructType\SendTransactionsList()) !== false) { print_r($send->getResult()); } else { print_r($send->getLastError()); } /** * SendTransaction 操作/方法的示例调用 */ if ($send->SendTransaction(new \StructType\SendTransaction()) !== false) { print_r($send->getResult()); } else { print_r($send->getLastError()); } /** * SendTransactionsData 操作/方法的示例调用 */ if ($send->SendTransactionsData(new \StructType\SendTransactionsData()) !== false) { print_r($send->getResult()); } else { print_r($send->getLastError()); } /** * SendTransactionsXml 操作/方法的示例调用 */ if ($send->SendTransactionsXml(new \StructType\SendTransactionsXml()) !== false) { print_r($send->getResult()); } else { print_r($send->getLastError()); } /** * SendTransactionsPostAsBulk 操作/方法的示例调用 */ if ($send->SendTransactionsPostAsBulk(new \StructType\SendTransactionsPostAsBulk()) !== false) { print_r($send->getResult()); } else { print_r($send->getLastError()); }