Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

XML and PHP - HOW???


NGR

Recommended Posts

Hi there guys!

 

Please can someone help - maybe someone has done something similar!

 

My payment gateway needs me to do the following!

 

Right,

 

An IA_Auth method allows for the merchant to initiate an Internet Account payment pre-order/staged order. 

The IA_Auth XML tag is represented as <IA_Auth> (opening tag) and </ IA_Auth > (closing tag). 

 

NOTE: All Transaction input XML documents must be sent to https://secure.SafeShop.co.za/s2s/SafePay.asp

WARNING: All XML tags are case-sensitive. If the case of the XML tag is not set to the correct case, SafeShop? will issue a failed XML transaction.  Sample 34 demonstrates the minimum IA_Auth input Transaction XML document that will be sent to SafeShop? for processing.  <?xml version="1.0" ?>  <Safe>    <Merchant>            <SafeKey>{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}</SafeKey>    </Merchant>    <Transactions>        <IA_Auth>            <MerchantReference> SafeShop_Pro_3/4/2002 3:29:20 PM </MerchantReference>            <PaymentMethod>ican</PaymentMethod>              <Amount>3200</Amount>              </IA_Auth>    </Transactions>  </Safe>

 

So i tried to post the information - needless to say with no sucess. After asking for help this is what they sent me!

 

 

Our programmers have checked the information that you sent through and have told me that you are trying to POST the information to our server. You cannot POST to this server.

 

Even if you just go to http://secure.safeshop.co.za/s2s/SafePay.asp? you will see your error message.

 

What you have to do is PARSE the information to the server using the XML parser.

 

This is why you need the Php/XML Parse to send information also.

Our programmers have checked the information that you sent through and have told me that you are trying to POST the information to our server. You cannot POST to this server.

 

Even if you just go to http://secure.safeshop.co.za/s2s/SafePay.asp? you will see your error message.

 

What you have to do is PARSE the information to the server using the XML parser.

 

This is why you need the Php/XML Parse to send information also.

 

Any idea how to do the above - please guys im really stuck. Been looking and looking into that xml parse and its making no sense... my knowledge of xml is almost non-existent.

 

Thanks again for any help!

 

Nick :P

Link to comment
Share on other sites

HA HA HA....

 

Would love to but they're the only people here in SA who do what I want and NEED!!!

 

Anyone have any idea's??

 

I have been trying to use curl -> this is what I did, but apparently it is wrong because I am POSTING it and not PARSING it...

 

Any idea's what im doing wrong??

 

if ($ch = curl_init()) {

            curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);

            curl_setopt ($ch, CURLOPT_URL, $url);

            curl_setopt ($ch, CURLOPT_POST, 1);

            curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);

            curl_setopt ($ch, CURLOPT_HEADER, 0);

            curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);

            curl_setopt ($ch, CURLOPT_TIMEOUT, 120);

            curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");

 

            $result = curl_exec ($ch);

 

Thanks guys!!!!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...