title: How do I receive this code in php? And how do I consume it?
body: <p>I'm working on a website project to consume a web service, how do I receive this in php and how do I consume it? Thank you for helping out. I need to connect to their API, send the XML file genrerated in my website and then receive the response. <a href="http://www.safaricom.co.ke/business/corporate/m-pesa-payments-services/m-pesa-api" rel="nofollow noreferrer">http://www.safaricom.co.ke/business/corporate/m-pesa-payments-services/m-pesa-api</a> for the api</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:c2b="http://cps.huawei.com/cpsinterface/c2bpayment"&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;c2b:C2BPaymentConfirmationRequest&gt;
           &lt;TransactionType&gt;PayBill&lt;/TransactionType&gt;
           &lt;TransID&gt;1234560000007031&lt;/TransID&gt;
           &lt;TransTime&gt;20140227082020&lt;/TransTime&gt;
           &lt;TransAmount&gt;123.00&lt;/TransAmount&gt;
           &lt;BusinessShortCode&gt;12345&lt;/BusinessShortCode&gt;
           &lt;BillRefNumber&gt;TX1001&lt;/BillRefNumber&gt;
           &lt;InvoiceNumber&gt;&lt;/InvoiceNumber&gt;
           &lt;OrgAccountBalance&gt;12345.00&lt;/OrgAccountBalance&gt;
  &lt;ThirdPartyTransID&gt;&lt;/ThirdPartyTransID&gt;
  &lt;MSISDN&gt;254722703614&lt;/MSISDN&gt;
           &lt;KYCInfo&gt;
              &lt;KYCName&gt;[Personal Details][First Name]&lt;/KYCName&gt;
              &lt;KYCValue&gt;Hoiyor&lt;/KYCValue&gt;
          &lt;/KYCInfo&gt;
          &lt;KYCInfo&gt;
              &lt;KYCName&gt;[Personal Details][Middle Name]&lt;/KYCName&gt;
              &lt;KYCValue&gt;G&lt;/KYCValue&gt;
          &lt;/KYCInfo&gt;
          &lt;KYCInfo&gt;
              &lt;KYCName&gt;[Personal Details][Last Name]&lt;/KYCName&gt;
              &lt;KYCValue&gt;Chen&lt;/KYCValue&gt;
          &lt;/KYCInfo&gt;
        &lt;/c2b:C2BPaymentConfirmationRequest&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>