lemonwaysas/php-client-directkit-xml

Error "Wrong IP format" using client from console

josecelano opened this issue · 1 comments

I am using the client in a console command and I get that error calling the moneyInValidate endpoint.

DEBUG INTPUT START

<?xml version="1.0" encoding="UTF-8"?>
<soap12:Envelope xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soap12:Body>
      <MoneyInValidate xmlns="Service_mb_xml">
         <transactionId>11025</transactionId>
         <amountTot>1.00</amountTot>
         <amountCom>1.00</amountCom>
         <version>1.0</version>
         <wlPass>society</wlPass>
         <wlLogin>123456</wlLogin>
         <language>en</language>
         <walletIp />
         <walletUa />
      </MoneyInValidate>
   </soap12:Body>
</soap12:Envelope>

DEBUG INTPUT END

DEBUG OUTPUT START

E : 
----Error : 
----Code : 248
----Msg : Wrong IP format
----Prio : 2
DEBUG OUTPUT END

F

It seems you have fixed the problem and I suppose I have to add this new option $this->config->remote_addr when I am using the client from console. Is that right?

Yes, indeed, you can use the variable $remote_addr in Config to test with IP addresses.