CyberSource Integration

Contrib type: 
Module
Status: 
Work in progress
Compatibility: 
Ubercart 1.x

This is the initial upload of the CyberSource module. It includes integration of the Silent Order POST method, which requires you to do a couple things in your account.

In Tools & Settings, there is a Hosted Order Page section. You need to go the security section and download the security script it offers for PHP. You'll place this in your uc_cybersource directory. The file contains a function that conflicts with a Drupal function. I'll probably make a script to fix this, but for now just open the file and do a find/replace to change all instances of L( to csL(.

You must also adjust the Hosted Order Page settings. Specifically you need set the Receipt Response URL and Decline Response URL to http://www.example.com/cs/receipt and check the box beneath both those textfields. This really just reports to a dummy URL defined by the module, but you have to check the checkboxes so the module can receive the transaction results and act on them. Use the same URL as your Merchant POST URL.

Once you've done these things, you should be ready to test it out! When testing with CyberSource's Silent Order POST service, you can't process anything over $1,000. This limitation will not apply in production mode.

Future plans include adding Simple Order API integration to this module.


PreviewAttachmentSize
uc_cybersource.tar.gz7.91 KB
Joined: 12/12/2007
Juice: 42

My company is talking to cybersource, and they've informed us that the $1000 limit is only applicable in test accounts; real (active) accounts are not limited.

Joined: 08/07/2007
Juice: 15046

Excellent news! Thanks a lot for posting. Smiling

Joined: 12/12/2007
Juice: 42

It seems like the card types being sent by the module do not work at Cybersource. The module sends strings like MasterCard, Visa, but they seem to want '001', '002', etc, as per

http://apps.cybersource.com/library/documentation/dev_guides/HOP_UG/html...

When I modified the code around line 135, in ubercart/uc_cybersource/uc_cybersource.module, to use the codes, payments worked. Do you know if this is due to the fact that I'm using a test account? Or has the PHP fallen behind Cybersource's choice of credit card codes?

Thanks!!

Joined: 08/07/2007
Juice: 15046

You're correct, and those strings are adjusted in the latest Bazaar version... don't know that I updated this contrib.

Joined: 12/12/2007
Juice: 42

Is there a release candidate with this fix that we can use instead of the bazaar/dev version?

Joined: 08/07/2007
Juice: 15046

Not quite... downloading the zip from the top of the Bazaar page is really the latest official code. All our releases move from their to the Drupal CVS server.

Joined: 06/05/2008
Juice: 4

Anyone know if this will work if I'm based in the UK?

Joined: 07/28/2008
Juice: 2

I'm looking to use Cybersource's Hosted Order Page solution because I don't want to take credit cards on my site. Can this be done with Ubercart 5.x-1.2? The problem is Credit Card module is required and wants a non-public directory to write to, I don't want to take credit cards at all. Thanks!

Joined: 08/07/2007
Juice: 15046

Hmm... can't remember why it depends on the CC module, but you can simply go there and specify your files directory. It will write to it a .key file that just won't be used, though you can still add it to your exclusions list in your .htaccess if you want. I'll review the code to see why it specifies CC as a dependency. It's probably b/c the module was going to combine HOP with Silent Order POST (or Simple Order API... whatever they call it. I've done too many of these. Eye-wink)

Joined: 12/03/2009
Juice: 11

I just posted a bounty for this. If anyone else would like to co-sponsor or be involved, please chime in.

Also, isn't cybersource integration part of ubercart 2, and this thread says ubercart 1 - is there somewhere else I should be posting about how to use HOP without silent post?