Jump to content

PHP and XML


doubledee

Recommended Posts

I should add that PHP does have functions for parsing and manipulating data though, depending on what version of ASP your looking at it might not.

 

How hard is it to work with XML?

 

How hard would it be for me to convert the sample code they gave me from ASP to PHP?

 

The code looks like gibberish, but I am hoping that is more ASP and bad coding than this being an insurmountable goal?!  :-\

 

Thanks,

 

 

Debbie

 

Link to comment
Share on other sites

How hard would it be for me to convert the sample code they gave me from ASP to PHP?

 

How would we know? Firstly, we have no idea of your PHP abilities and secondly we haven't see the code your talking about. If it looks like gibberish to you I would say its' going to be quite the difficult task. Personally, I don't read gibberish that well.

Link to comment
Share on other sites

How hard would it be for me to convert the sample code they gave me from ASP to PHP?

 

How would we know? Firstly, we have no idea of your PHP abilities and secondly we haven't see the code your talking about. If it looks like gibberish to you I would say its' going to be quite the difficult task. Personally, I don't read gibberish that well.

 

Uh, the point was how hard would it be to convert how you handle XML to how you handle it in PHP!

 

If working with XML is independent of the programming language, then that probably makes the task easier.

 

But if the way you do XML in ASP is radically different than how you do it in PHP, then it might be a real bear to work with since I don't know ASP.

 

----

 

I guess the idea of XML is that you are marking up data so that when you pass it, it can be identified, right?  (As opposed to storing it in an array where you are working off of the $key->$value pair concept, right?)

 

 

Debbie

 

Link to comment
Share on other sites

XML is essentially just another markup language like HTML. So really, your just dealing with strings. PHP does however have some functions that are useful if your trying to parse these strings for data.

 

You haven't mentioned whether or not your receiving XML that needs to be parsed or creating XML that needs to be sent. Either way, it can be done via either hands on string manipulation or using PHP's built in functionality.

Link to comment
Share on other sites

XML is essentially just another markup language like HTML.

 

Right, that much I know.  I just don't know what "nodes" are or how to create an "XML Tree" or whatever it is called?!

 

 

So really, your just dealing with strings. PHP does however have some functions that are useful if your trying to parse these strings for data.

 

Okay, so some of the ASP I've been trying to decipher is probably ASP's built in XML functions.

 

 

You haven't mentioned whether or not your receiving XML that needs to be parsed or creating XML that needs to be sent. Either way, it can be done via either hands on string manipulation or using PHP's built in functionality.

 

Not trying to be secretive - just trying to take this in small steps as to not scare any help off!

 

Well, to answer your question at a higher level...  I not really sure how this entire e-commerce thing works?!  (God knows they don't have any useful online help or tutorials?!  ::)

 

Conceptually, this much I *think* I know about how a Payment Gateway works...  (Feel free to jump in and correct me!)

 

1.) I gather the *right* fields in my "Checkout Form"

2.) I make sure they are in the *right* format

3.) I also obviously need to do data-validation

4.) I bundle up everything and create some long XML string?

5.) I send that XML-string to the Payment Gateway's server

6.) It reads the data and either sends back a "Pass" or "Fail" message and maybe some additional codes (Don't know what format that is in?!)

 

Authorize.net's system looks much easier because it doesn't use XML and it just has a cleaner interface (um, API??) based on the sample code - in PHP - I got from them today.

 

Unfortunately, I'm not sure if I can use Authorize.net with Elavon and my bank or how much trouble that will cause, so I am *trying* to figure out how Internet Secure does things.

 

The tech told me I should be able to figure this out in a few days to a week, but I'm skeptical!!!  :o

 

As always, I am eager to roll up my sleeves and get dirty, but I also clearly need some help.

 

So that is sorta where I am...

 

 

Debbie

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.