Cybersource SOAP API

638 views
Skip to first unread message

Matt M

unread,
Jul 5, 2007, 7:11:58 PM7/5/07
to Active Merchant
Has anyone taken a stab at writing an Active Merchant gateway for
Cybersource's SOAP API? I know their other API is too closed off to
ruby to make it worth the time but their SOAP API shouldn't be too
bad.

http://cybersource.com/support_center/implementation/downloads/soap_api/SOAP_toolkits.pdf

Matt Margolis

Cody Fauser

unread,
Jul 5, 2007, 9:33:59 PM7/5/07
to activem...@googlegroups.com
Don't the actual SOAP API calls have to go through their proprietary C
library though? I was looking at an XML based API of theirs a short
while ago and that was the case then.


--
Cody Fauser
http://shopify.com - e-commerce done right
http://www.codyfauser.com - blog
http://www.oreilly.com/catalog/rjsrails - RJS Templates for Rails

Matt M

unread,
Jul 5, 2007, 10:13:01 PM7/5/07
to Active Merchant
I don't believe so. I downloaded the WSDL and used SOAP4R on it and
got what looks like a fully complete communication system for sending
and receiving transaction information. I don't have a CyberSource
test account so I can not actually try it out but I think it should
work.

Matt Margolis

On Jul 5, 8:33 pm, "Cody Fauser" <codyfau...@gmail.com> wrote:
> Don't the actual SOAP API calls have to go through their proprietary C
> library though? I was looking at an XML based API of theirs a short
> while ago and that was the case then.
>

> On 7/5/07, Matt M <mrmargo...@gmail.com> wrote:
>
>
>
> > Has anyone taken a stab at writing an Active Merchant gateway for
> > Cybersource's SOAP API? I know their other API is too closed off to
> > ruby to make it worth the time but their SOAP API shouldn't be too
> > bad.
>

> >http://cybersource.com/support_center/implementation/downloads/soap_a...
>
> > Matt Margolis
>
> --
> Cody Fauserhttp://shopify.com- e-commerce done righthttp://www.codyfauser.com- bloghttp://www.oreilly.com/catalog/rjsrails- RJS Templates for Rails

Cody Fauser

unread,
Jul 6, 2007, 9:29:37 AM7/6/07
to activem...@googlegroups.com
Do you have a link to the wsdl?

On 7/5/07, Matt M <mrmar...@gmail.com> wrote:
>

Matt M

unread,
Jul 6, 2007, 9:34:23 AM7/6/07
to Active Merchant
You can get the WSDL from https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/
This link can be found on the second page of the pdf. There is also a
link to production related info.

I couldn't figure out how to download the sample code in any of the
languages sinces the links in the pdf have the wrong domain.

Matt


On Jul 6, 8:29 am, "Cody Fauser" <codyfau...@gmail.com> wrote:
> Do you have a link to the wsdl?
>

> On 7/5/07, Matt M <mrmargo...@gmail.com> wrote:
>
>
>
>
>
> > I don't believe so. I downloaded the WSDL and used SOAP4R on it and
> > got what looks like a fully complete communication system for sending
> > and receiving transaction information. I don't have a CyberSource
> > test account so I can not actually try it out but I think it should
> > work.
>
> > Matt Margolis
>
> > On Jul 5, 8:33 pm, "Cody Fauser" <codyfau...@gmail.com> wrote:
> > > Don't the actual SOAP API calls have to go through their proprietary C
> > > library though? I was looking at an XML based API of theirs a short
> > > while ago and that was the case then.
>
> > > On 7/5/07, Matt M <mrmargo...@gmail.com> wrote:
>
> > > > Has anyone taken a stab at writing an Active Merchant gateway for
> > > > Cybersource's SOAP API? I know their other API is too closed off to
> > > > ruby to make it worth the time but their SOAP API shouldn't be too
> > > > bad.
>
> > > >http://cybersource.com/support_center/implementation/downloads/soap_a...
>
> > > > Matt Margolis
>
> > > --

> > > Cody Fauserhttp://shopify.com-e-commerce done righthttp://www.codyfauser.com-bloghttp://www.oreilly.com/catalog/rjsrails-RJS Templates for Rails

Cody Fauser

unread,
Jul 6, 2007, 10:05:53 AM7/6/07
to activem...@googlegroups.com
From their Simple Order documentation:

------------
About the XML API
To use the API, create an XML message that contains the information
for calling the ICS
services you want to use. In this case, the ICS service you want to
use is the credit card
authorization. The client digitally signs and sends your request. You
only need to create
Correlating Fields Names
the request XML message and parse the XML reply message. See page90
for an example
XML request and reply.
----------

The client is their proprietary libarary that actually performs the
communications with their servers.

Cody Fauser

unread,
Jul 6, 2007, 10:09:48 AM7/6/07
to activem...@googlegroups.com
The problem that I had was that without the client there is no way to
digitally sign the requests.

Matt M

unread,
Jul 6, 2007, 10:24:52 AM7/6/07
to Active Merchant
Are you sure? I think the "Simple Order API" is not the same thing
as their SOAP Toolkit API. If you look on
http://cybersource.com/support_center/implementation/downloads/ they
have them separated out from each other as separate approaches.

On page 3 of the PDF I linked to they show you how to generate a key
on their site that you can use to sign your transmissions. You do it
through a web interface, no closed client required.

Matt Margolis

On Jul 6, 9:09 am, "Cody Fauser" <codyfau...@gmail.com> wrote:
> The problem that I had was that without the client there is no way to
> digitally sign the requests.
>

> On 7/6/07, Cody Fauser <codyfau...@gmail.com> wrote:
>
>
>
> > From their Simple Order documentation:
>
> > ------------
> > About the XML API
> > To use the API, create an XML message that contains the information
> > for calling the ICS
> > services you want to use. In this case, the ICS service you want to
> > use is the credit card
> > authorization. The client digitally signs and sends your request. You
> > only need to create
> > Correlating Fields Names
> > the request XML message and parse the XML reply message. See page90
> > for an example
> > XML request and reply.
> > ----------
>
> > The client is their proprietary libarary that actually performs the
> > communications with their servers.
>

> > On 7/6/07, Cody Fauser <codyfau...@gmail.com> wrote:
> > > Do you have a link to the wsdl?
>

> > > On 7/5/07, Matt M <mrmargo...@gmail.com> wrote:
>
> > > > I don't believe so. I downloaded the WSDL and used SOAP4R on it and
> > > > got what looks like a fully complete communication system for sending
> > > > and receiving transaction information. I don't have a CyberSource
> > > > test account so I can not actually try it out but I think it should
> > > > work.
>
> > > > Matt Margolis
>
> > > > On Jul 5, 8:33 pm, "Cody Fauser" <codyfau...@gmail.com> wrote:
> > > > > Don't the actual SOAP API calls have to go through their proprietary C
> > > > > library though? I was looking at an XML based API of theirs a short
> > > > > while ago and that was the case then.
>
> > > > > On 7/5/07, Matt M <mrmargo...@gmail.com> wrote:
>
> > > > > > Has anyone taken a stab at writing an Active Merchant gateway for
> > > > > > Cybersource's SOAP API? I know their other API is too closed off to
> > > > > > ruby to make it worth the time but their SOAP API shouldn't be too
> > > > > > bad.
>
> > > > > >http://cybersource.com/support_center/implementation/downloads/soap_a...
>
> > > > > > Matt Margolis
>
> > > > > --

> > > > > Cody Fauserhttp://shopify.com-e-commerce done righthttp://www.codyfauser.com-bloghttp://www.oreilly.com/catalog/rjsrails-RJS Templates for Rails

Matt M

unread,
Jul 6, 2007, 10:39:22 AM7/6/07
to Active Merchant
I found the location from which sample code for some languages can be
downloaded. https://ics2wstest.ic3.com/commerce/sample_php.zip Look
in the pdf for other sample_language.zip links and plug them in at the
end of that URL.

Matt Margolis

> > > > > > Cody Fauserhttp://shopify.com-e-commercedone righthttp://www.codyfauser.com-bloghttp://www.oreilly.com/catalog/rjsrails...Templates for Rails
>
> > > > --
> > > > Cody Fauser
> > > >http://shopify.com-e-commerce done right
> > > >http://www.codyfauser.com-blog


> > > >http://www.oreilly.com/catalog/rjsrails-RJS Templates for Rails
>
> > > --
> > > Cody Fauser

> > >http://shopify.com-e-commerce done right
> > >http://www.codyfauser.com-blog
> > >http://www.oreilly.com/catalog/rjsrails-RJS Templates for Rails
>
> > --

Cody Fauser

unread,
Jul 6, 2007, 10:41:20 AM7/6/07
to activem...@googlegroups.com
Matt,

It looks like you're right. I don't think they offered the separate
soap API the last time I looked.

I remember that their API was straightforward, so it should be easy to
implement. The SOAP messages will have to be constructed using
Builder for inclusion into ActiveMerchant, as we won't include soap4r
in the project, but that is pretty easy. The PaypalGateway does this.

Are you planning on implementing it?


Cody

Matt M

unread,
Jul 6, 2007, 10:44:35 AM7/6/07
to Active Merchant
The link I just posted to the php sample code appears to be wrong. I
get a zip file but it doesn't look like a proper zip. Darn. Well I
guess we don't really need sample code since they show an example
request in the pdf. I will probably contact them to see if they have
any more documentation available.

Yes, I am probably going to be implementing the SOAP Toolkit API. Any
advice about implementing using builder or about implementing Active
Merchant gateways in general would be greatly appreciated.

Matt

On Jul 6, 9:41 am, "Cody Fauser" <codyfau...@gmail.com> wrote:
> Matt,
>
> It looks like you're right. I don't think they offered the separate
> soap API the last time I looked.
>
> I remember that their API was straightforward, so it should be easy to
> implement. The SOAP messages will have to be constructed using
> Builder for inclusion into ActiveMerchant, as we won't include soap4r
> in the project, but that is pretty easy. The PaypalGateway does this.
>
> Are you planning on implementing it?
>
> Cody
>

> > > > > > > Cody Fauserhttp://shopify.com-e-commercedone righthttp://www.codyfauser.com-bloghttp://www.oreilly.com/catalog/rjsrails...Templates for Rails
>
> > > > > --
> > > > > Cody Fauser
> > > > >http://shopify.com-e-commerce done right
> > > > >http://www.codyfauser.com-blog


> > > > >http://www.oreilly.com/catalog/rjsrails-RJS Templates for Rails
>
> > > > --
> > > > Cody Fauser

> > > >http://shopify.com-e-commerce done right
> > > >http://www.codyfauser.com-blog
> > > >http://www.oreilly.com/catalog/rjsrails-RJS Templates for Rails
>
> > > --


> > > Cody Fauserhttp://shopify.com-e-commerce done righthttp://www.codyfauser.com-bloghttp://www.oreilly.com/catalog/rjsrails-RJS Templates for Rails
>
> --

Cody Fauser

unread,
Jul 6, 2007, 10:51:53 AM7/6/07
to activem...@googlegroups.com
Matt,

Take a look at http://code.google.com/p/activemerchant/wiki/Contributing.

PayPal is probably the best to look at because it is currently using
SOAP and uses a client certificate.

See the files:
lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb
lib/active_merchant/billing/gateways/paypal.rb

And the tests:
test/unit/gateways/paypal_test.rb
test/remote_tests/remote_paypal_test.rb

Using Mocha to moch out the responses like in paypal_test.rb works really well.

On 7/6/07, Matt M <mrmar...@gmail.com> wrote:
>

Fredrik

unread,
Jul 20, 2007, 10:29:36 PM7/20/07
to Active Merchant
Any more updates on this. I'd be interested in any partial
implementation available.

Thanks,
Fredrik

On Jul 6, 9:51 am, "Cody Fauser" <codyfau...@gmail.com> wrote:
> Matt,
>

> Take a look athttp://code.google.com/p/activemerchant/wiki/Contributing.


>
> PayPal is probably the best to look at because it is currently using
> SOAP and uses a client certificate.
>
> See the files:
> lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb
> lib/active_merchant/billing/gateways/paypal.rb
>
> And the tests:
> test/unit/gateways/paypal_test.rb
> test/remote_tests/remote_paypal_test.rb
>
> Using Mocha to moch out the responses like in paypal_test.rb works really well.
>

> > > > > > > > > Cody Fauserhttp://shopify.com-e-commercedonerighthttp://www.codyfauser.com-bloghttp://www.oreilly.com/catalog/rjsrails...for Rails


>
> > > > > > > --
> > > > > > > Cody Fauser
> > > > > > >http://shopify.com-e-commercedone right

> > > > > > --
> > > > > > Cody Fauser
> > > > > >http://shopify.com-e-commercedone right

> > > > > --
> > > > > Cody Fauserhttp://shopify.com-e-commercedone righthttp://www.codyfauser.com-bloghttp://www.oreilly.com/catalog/rjsrails...Templates for Rails
>
> > > --

Matt M

unread,
Jul 22, 2007, 10:14:55 AM7/22/07
to Active Merchant
I have a working implementation for authorizations, captures,
purchases, and tax calculations but I would like to make it follow
some of the AM "rules" more closely and write a few more tests and
more rdoc friendly documentation. If you can hang on for about a week/
week and a half I will have it submitted by then.

Matt Margolis

> > > > > > > > > > Cody Fauserhttp://shopify.com-e-commercedonerighthttp://www.codyfauser.com-blogh...Rails


>
> > > > > > > > --
> > > > > > > > Cody Fauser
> > > > > > > >http://shopify.com-e-commercedoneright

> > > > > > > >http://www.codyfauser.com-blog
> > > > > > > >http://www.oreilly.com/catalog/rjsrails-RJSTemplatesfor Rails


>
> > > > > > > --
> > > > > > > Cody Fauser
> > > > > > >http://shopify.com-e-commercedoneright
> > > > > > >http://www.codyfauser.com-blog
> > > > > > >http://www.oreilly.com/catalog/rjsrails-RJSTemplatesfor Rails
>
> > > > > > --
> > > > > > Cody Fauserhttp://shopify.com-e-commercedonerighthttp://www.codyfauser.com-bloghttp://www.oreilly.com/catalog/rjsrails...for Rails
>
> > > > --

Matt M

unread,
Jul 22, 2007, 10:46:11 AM7/22/07
to Active Merchant
I had some extra time this morning so I submitted my implementation of
the CyberSource Gateway. I will be integrating AM-CyberSource into a
large web application over the next week and I expect that the
integration process will inspire me to refactor certain parts of the
code. I will submit updates if I add anything substantial.

The gateway has been tested and appears to be completely operational
but it has not yet been extensively used in a production environment.
If you run into any problems let me know.

Enjoy.

Matt Margolis

> > > > > > > > > --
> > > > > > > > > Cody Fauser
> > > > > > > > >http://shopify.com-e-commercedoneright
> > > > > > > > >http://www.codyfauser.com-blog

> > > > > > > > >http://www.oreilly.com/catalog/rjsrails-RJSTemplatesforRails
>
> > > > > > > > --
> > > > > > > > Cody Fauser

> > > > > > > >http://shopify.com-e-commercedoneright
> > > > > > > >http://www.codyfauser.com-blog
> > > > > > > >http://www.oreilly.com/catalog/rjsrails-RJSTemplatesforRails


>
> > > > > > > --
> > > > > > > Cody Fauserhttp://shopify.com-e-commercedonerighthttp://www.codyfauser.com-blogh...Rails
>
> > > > > --

Cody Fauser

unread,
Jul 22, 2007, 10:56:50 AM7/22/07
to activem...@googlegroups.com
Awesome, thanks Matt.

Fredrik

unread,
Jul 24, 2007, 12:26:27 PM7/24/07
to Active Merchant
Thanks Matt,

You said submitted it. To where? I checked the repository, but could
not see it or am I too early.

Thanks again for helping out. I probably owe you a couple of days
vacation once I have it running ;)

Fredrik

On Jul 22, 9:56 am, "Cody Fauser" <codyfau...@gmail.com> wrote:
> Awesome, thanks Matt.
>

Cody Fauser

unread,
Jul 24, 2007, 3:38:28 PM7/24/07
to activem...@googlegroups.com
Fredrik,

The patch is still on Google Code
http://code.google.com/p/activemerchant/issues/list.

Hopefully I'll have it merged soon.

Fredrik

unread,
Jul 24, 2007, 5:00:59 PM7/24/07
to Active Merchant
Thanks for the link Cody,

Didn't know about the tracker.

It applied just fine, thanks.

Fredrik

On Jul 24, 2:38 pm, "Cody Fauser" <codyfau...@gmail.com> wrote:
> Fredrik,
>

> The patch is still on Google Codehttp://code.google.com/p/activemerchant/issues/list.


>
> Hopefully I'll have it merged soon.
>

> > > Cody Fauserhttp://shopify.com-e-commerce done righthttp://www.codyfauser.com-bloghttp://www.oreilly.com/catalog/rjsrails-RJS Templates for Rails

Matthew Margolis

unread,
Jul 24, 2007, 10:01:32 PM7/24/07
to activem...@googlegroups.com
Good to hear.  I hope it works out well for you.

Matt Margolis

On 7/24/07, Fredrik <fredrik....@gmail.com > wrote:
Reply all
Reply to author
Forward
0 new messages