ホームページ >バックエンド開発 >PHPチュートリアル >PHP呼び出し時の.NET WebServiceパラメータ受け渡し問題について
function CreditCardChargeAction(){ $ezidebit_client = new \SoapClient("http://ws.cardcall.com.au:8092/CreditCardCharge.svc?WSDL"); $ezidebitRequest = array("biz"=>array("BizID"=>"5","ClientIP"=>"101.178.140.96","HttpReferer"=>"https://www.hellophonecards.com.au/hpchome/recharge.aspx", "BMUserAdminID"=>"1","GMUserAdminID"=>"1","Reason"=>"TPC","CardName" => "1147725","CardNumber" => "4862700011382664","CVV"=>"111", "ExpiryYear" => "16","ExpiryMonth" => "10","Amount" => "10","Currency"=>"AUD", "SerialNo" => "CCAW0101171577","Bonus" => "0")); $soap_result = $ezidebit_client->DoCreditCardCharge($ezidebitRequest);}
これは WSDL によって異なります
URL はアクセス可能ですかはい、WSDL ドキュメント
または
print_r($ezidebit_client->getFunctions()); の結果を投稿する必要があります。 ARDHARCH(DOCREDITCARDCHARGE $パラメーター)
DOCREDITCARDCHARCHのみがdocreditCardCharge構造のパラメーターのみを持っています
配列
[biz] => array
([bizid] =>5
。//www.helllyophonecards.com.au /hphome/recharge.aspx
[bmuseradminid] = & gt;
[gt; 理由] = & gt;
[カード番号] => 486270001138266 4
=>>そして順番が間違っています。注: .Net には非常に厳しいパラメーター要件があります
print_r によって出力される結果は、var_dump によって出力されるものよりはるかにきれいですか?
array (size=1) 0 => string 'DoCreditCardChargeResponse DoCreditCardCharge(DoCreditCardCharge $parameters)' (length=77)string 'struct PayOnlyContract { decimal Amount; string CVV; string CardName; string CardNumber; string Currency; int ExpiryMonth; int ExpiryYear; string Notes; string OrderNumber; int UserDialogSubCategoryID;}' (length=213)string 'struct BizBaseContract { int BMUserAdminID; int BizID; string ClientIP; int GMUserAdminID; string HttpReferer; string Reason;}' (length=133)string 'struct PayPhoneCardByWebsiteContract { decimal Amount; decimal Bonus; string CVV; string CardName; string CardNumber; string Currency; int ExpiryMonth; int ExpiryYear; string SerialNo;}' (length=195)string 'struct OrderPinsContract { decimal Amount; decimal Bonus; int CardProductID; string FaceValue; string MerchUniqRef; string OrderNumber; int Qty;}' (length=153)string 'struct PayFlyerCardContract { decimal Amount; decimal Bonus; string CVV; string CardName; string CardNumber; string CardTypePrefix; string Currency; int ExpiryMonth; int ExpiryYear;}' (length=192)string 'struct PayPhoneCardByStaffContract { decimal Amount; decimal Bonus; string CVV; string CardName; string CardNumber; string Currency; int ExpiryMonth; int ExpiryYear; string SerialNo;}' (length=193)string 'struct PayUserContract { decimal Amount; string CVV; string CardName; string CardNumber; string Currency; int ExpiryMonth; int ExpiryYear; int UserID;}' (length=160)string 'struct PayAgentCCContract { decimal Amount; string CVV; string CardName; string CardNumber; int ChargeID; string Currency; int ExpiryMonth; int ExpiryYear; string Note;}' (length=179)string 'struct PayUserDialogContract { decimal Amount; string CVV; string CardName; string CardNumber; string Currency; int ExpiryMonth; int ExpiryYear; string Notes; int UserDialogID; int UserDialogSubCategoryID;}' (length=217)string 'struct ReturnValContract { string Msg; int Success;}' (length=55)string 'struct DoCreditCardCharge { BizBaseContract biz;}' (length=51)string 'struct DoCreditCardChargeResponse { ReturnValContract DoCreditCardChargeResult;}' (length=82)string 'int char' (length=8)string 'duration duration' (length=17)string 'string guid' (length=11)
データ コントラクトとビジネス ID が一致しません
データ コントラクトとビジネス ID が一致しません