cancel
Showing results for 
Search instead for 
Did you mean: 

Where do I put the Sample Code for SIM PHP?

Hi I am really new to this payment gateway integration. Where do I place the sample files and which exact files do i palce on my WordPress web site? I do not have a store yet but I just wish to send clients to a page where they can pay using credit card. Thank you.

LCDYML
Member
6 REPLIES 6

Hello @LCDYML 

It's been a while since this was first posted. I would recommend subscribing to this topic so that you'll be alerted via email if anyone from the community is able to respond with any comments. To subscribe, click Topic Options at the top of this thread and then select Subscribe. You'll then receive an email once anyone replies.

Thanks,

Richard

RichardH
Administrator Administrator
Administrator

From where you are coming from, I would say: stop. Find someone who has already packaged up the API into a plugin that will work with your chosen shop, and go with that. The answer to your question is not a set of simple steps; it involves understanding many of the technical details, protocols, security, and more. Coming at this from no experience may mean several days or work, or several weeks. It all depends on your experience.

jasonjudge
Contributor

Thank you. I am not so knowledgeable with this yet. We have set our web site to use just teh Simple Checkout for now. However, we wish to do the SIM as well. You are right, it is not easy. However, if there are step by step directions that I can follow I may most likely be able to figure it out. I understand that it may be a whole tutorial for me but if I can just see where to put which, then I may start doing something. Perhaps I will use it with sandbox initially. Will also look for a very good plugin. Thank you.

I often find drawing a network flow diagram can help to understand the flow through the system. Those on this site kind of miss out a lot of the detail (about what actually POSTs to what, and when) and that makes it difficult to visualize how everything hangs together.

 

I sketched one up for a SagePay API I was writing, and that should give you an idea of the kind of thing I mean:

 

https://github.com/judgej/omnipay-sagepay/raw/patch-1/docs/omnipay-sagepay-server.pdf

 

I've not got around to drawing one up for Authorize.Net yet. It might look complicated, but it answers a lot of questions, and makes sure you don't miss out any important parts of the protocol. SagePay Server is a close equivalent to Authorize.Net SIM.

 

Searching around though, I cannot find any simple tutorials to take you though integrating the SIM payment gateway. All I can suggest, is to play with the SDK, then once you understand that, work out which bits of that you will need (and which bits you leave behind). Some people will take the whole SDK and stick it into their site, and use it like a library, but personally I don't like doing that - any demo code with forms and suchlike in it could have any number of entry points that I'm not aware of, but which hackers may be.

Will have a look at the file, thank you very much!

Remember it's for SagePay and is focused on the PHP OmniPay implementation. But the concepts are similar. The main difference is that with SagePay the merchant site prepares the remote gateway to let it know a user is about to be sent its way for completing a payment form. The response to that allows the merchange site to grab the transaction ID generated by the gateway for tracking what happens next.

 

By contract, when your merchant account sents a user to the Authorize.Net SIM form, Authorize.Net has no idea is user is coming. They just land there with some POST data. It is then up to your merchant site to generate its own transaction key and inject that into the POST and also save it in the database, because your merchant site won't know the outcome of the user's interaction with Authorize.Net until it gets its relay response back from Authorize.Net, and you only have your previously-saved transaction ID in that response to match the relay response (aka the callback) to the transaction you saved before sending the user off to Authorize.Net.

 

I'll try and get that into a network flow diagram over the next week, because it is so much easier to see the flow diagramatically than to describe it with words.

 

Do check out some ready-made solutions though :-)