Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Writing a new payment module - wiki no help

Writing a new payment module - wiki no help

Locked

Views: 1,817

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
14 Sep 2007, 5:47 AM
#1
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Writing a new payment module - wiki no help

I searched the forum, and all I found were people with questions, not answers. I looked at the wiki - and see nobody's actually filled it out :)

So... I just signed on with Paymentech for my credit card processing. To my suprise, there's no current module for zen-cart. So I guess I'll be writing one.

I've written some contribs before, so I'm more or less familiar with how zen works... but none of my work has ever involved two way communication with another server.

So, my over-all question: where do I begin?

But more specifically... how do I send (i'm sure I can figure that out) and receive (that's the shrug-my-shoulders part) the XML schema required by the gateway?

They have SDKs for every language under the sun except PHP, which also suprised me.

Searching Google for an hour, I was YET AGAIN suprised that virtualy no php-based carts seem to support Paymentech. If they just use XML, how hard can it be? I've never worked in XML, but it more-or-less looks like if you get the format down, its a no-brainer - and they give you the format.

Any tips? ideas? Thanks.

  • Steven
14 Sep 2007, 11:46 AM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,694
Plugin Contributions:
56

Re: Writing a new payment module - wiki no help

cURL is your friend.

good luck,
Scott

14 Sep 2007, 5:55 PM
#3
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: Writing a new payment module - wiki no help

Thanks.

The only payment module I've used so far is PayPal.... and I gather that works like this:

at the end of check out, the data is sent to PP. The order goes into a holding pattern. Then when PP is done, it directly sends data to a special return page and the order is finished.

Is that how other payments work? Or is PP special? From looking through the Perl SDK for Paymentech it sounds like its more instant than that... like the request and the response happen in the same "conversation" rather than PP's two-part deal.

  • Steven
14 Sep 2007, 6:15 PM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,694
Plugin Contributions:
56

Re: Writing a new payment module - wiki no help

The callback stuff is a PayPal quirk. Generally you will make a connection, do a data exchange and disconnect all inline. If it's possible, write a small stand alone program to get the protocol right and then integrate with the cart; it's much easier that way. And be sure your dev env and target env have the same PHP; php4 and php5 do DOM processing differently.

Good luck,
Scott

16 Sep 2007, 7:04 PM
#5
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: Writing a new payment module - wiki no help

Thanks for the tips Scott.

  • Steven