Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Aug 2006
    Location
    Kirkland, WA
    Posts
    79
    Plugin Contributions
    2

    Default CyberSource Payment Module Implementation Guidelines (SOP connection method)

    The CyberSource Payment Module is a third party module not supported by the Zen Cart Team. The original Contributor no longer maintains or provides technical support for the module. Should you need to process your Zen Cart store transactions through the CyberSource Payment Gateway, (following a customer request or other reasons) you will be pretty much on your own. The last published version of the CyberSource Payment Module (v1.04) appears capable of supporting a live Zen Cart store. Many of the reported difficulties are related to improper CyberSource Business Center parameter settings. The ZC Forum is the best source to review the reported anomalies.

    If you need ZC/CyberSource implementation help, please start a new thread. Please use this thread only to post corrections or additions to the Implementation Guidelines.

    The current Implementation Guidelines specifically address the Silent Order POST (SOP) Connection Method offered by CyberSource. Please refer to CyberSource documentation for more details on other connection methods (Hosted Order Page and Simple Order API). The Implementation Guidelines do not apply to the Hosted Order Page or to the Simple Order API connection methods. The use of the Hosted Order Page (HOP) connection method is not recommended (i.e. user’s and merchant passwords are sent unencrypted).

    According to CyberSource , the SOP method is a customized implementation of the Hosted Order Page used as an http POST API. The order process remains unchanged, but the customer sees your own custom order, receipt and error pages. The Zen Cart application provides these pages and you do not need to create them. There is no direct connection established between the customers and the Payment Gateway. A SSL Certificate needs to be present on the ZC store host. A secure connection (SSL) is used for all exchange with the Payment Gateway. Also, all passwords needed for ZC user’s logins and for ZC merchant admin logins are sent through the secure connection.

    Your success in implementing the Payment Module largely depends on your understanding of the CyberSource SOP environment. First and foremost you need to carefully read and understand the “CyberSource Silent Order POST” User’s Guide:
    http://apps.cybersource.com/library/...c/SOP_UG/html/
    A PDF version of the User’s Guide is also available:
    https://www.cybersource.com/support_...nt_order_post/

    CyberSource documentation is very well done and frequently updated. I have used the August 2006 edition of the User’ Guide for my ZC store project. Two revisions have been published since, in September and in November 2006.
    Do not expect much from the CyberSource Tech Support Team. I have experienced condescendence and contempt. The phone service is useless. E-mail contact provides better results.

    1. Obtain Payment Module v1.04 from Contributor
    Please download from http://www.motwo.com/cybersource_v1.04.zip (unknown contributor).
    The CyberSource Payment Module package (v1.04 ) contains 4 php files and 1 Readme.txt file.
    The HOP.php was included in the package as an example and is not usable for your implementation.
    You will have to obtain a newly generated version of the HOP.php file from the CyberSource Business Center (covered in paragraph 2.). Please do not be mislead by the naming of this file (HOP.php), we are here concerned with the SOP connection method only.
    You need an open account with CyberSource in order to send test transactions to their server. I believe CyberSource also offers temporary test accounts for developers.
    Be careful in installing the 4 php files in the proper ZC store host directories (FileZilla is a good and free FTP program). Use the same directory structure as found in the contributed zip file. When you unzip the “cybersource_v1.0.4.zip” file, make sure to use “Extract” (WinZip) with “All files/folders in archives” as well as “Use folder names” selected and save the result in a newly created directory. By doing so, you will have both the directory structure and the php files. In the package, there are 2 files with the same name (cs.php) but different sizes and they should be saved in different directories.

    The Readme.txt is a Notepad file with minimal formatting. Opening the file with MS WORD will make it easier to read.
    Please do not upload the 4 php flies immediately since minor modifications have to be completed before.

    2. Obtain a newly generated version of HOP.php file
    The HOP.php file is a library of 19 php functions as well as your private/public key set.
    Without a newly generated key set you will be denied access to the CyberSource server and unable to submit test or live transactions.
    To obtain the new HOP.php go to the CyberSource Business Center.
    From the left vertical bar menu:
    Settings >> HOP Security >> go down to the Generate Security Script and select the PHP programming language button, then click Submit. Save the downloaded file (HOP.php) on your local PC. Each new Security Script also contains a unique serial number inserted in the HOP.php file at or near line 169 (function getSerialNumber () { return “ xxxx…xxxx”;} ). Transactions submitted with an invalid serial number will be rejected. Please refer to SOP User’s Guide, page 14 (November 2006 edition).

    Open the HOP.php file with a HTML editor (HomeSite 5, Notepad++, etc.) and at or near line 166, you will need to enter your CyberSource account number in “function getMerchantID() { return “vxxxxxxx”; }” where “vxxxxxxx” is your CyberSource account number.

    While you are in the HOP.php program, might as well make a minor modification to remove a warning message (missing argument 2 for InsertSignature) appearing on the Step 3 of 3 page of the Checkout process.

    Before modification (at or near line 172):
    function InsertSignature($amount, $currency) {

    After modification (at or near line 172):
    function InsertSignature($amount) {

    This workaround patch eliminates the warning message but also restricts currency to US dollars only. Should you foresee the use of other currencies, you will need to devise and implement a more elegant solution to this problem. See also thread=41608.
    You are now ready to upload (FTP) the HOP.php file to your ZC store host in the proper directory.

    3. Specify proper CyberSource URL to send order requests
    Open the “includes/modules/payment/cs.php” file with an HTML editor. The default setting provided by the Contributor specifies the CyberSource production server URL. We need to change it to the test server URL. Please take note that, once the ZC store goes LIVE, you will need to go back to the production server.

    First, let’s comment out the production server URL
    Before modification (at or near line 50):
    // The line below is the production line.
    $this->form_action_url = 'https://orderpage.ic3.com/hop/ProcessOrder.do';

    After modification (at or near line 50):
    // The line below is the production line.
    // $this->form_action_url = 'https://orderpage.ic3.com/hop/ProcessOrder.do';

    Second, let’s specify the test server URL
    Before modification (at or near line 53):
    // The line below is for debugging and doesn't process the order or
    // return a status. It halts on CyberSource's checker script to show you
    // the data being received and if it's valid.
    //$this->form_action_url = 'https://orderpage.ic3.com/hop/CheckOrderData.do';

    After modification (at or near line 53):
    // The line below is for debugging and doesn't process the order or
    // return a status. It halts on CyberSource's checker script to show you
    // the data being received and if it's valid.
    $this->form_action_url = 'https://orderpagetest.ic3.com/hop/ProcessOrder.do';
    (this URL is indeed different from the one found in the original file!)

    You are now ready to upload (FTP) the cs.php file to your ZC store host in the proper directory.


    4. Install the cs module in Zen Cart Admin
    Go to ZC Admin >> Modules >> Payment.
    If you cannot see the cs module in the list of modules, it means that one or more of the 4 php files are not uploaded in the proper directory on the ZC store host.
    Be careful here, since you have 2 “Credit Card” modules listed under the column titled Modules.
    Only the one with the “cs” under the next right column is needed. All other modules should be left in the non active mode.
    Select the proper cs module and click “+Install” in the upper right box.
    Once installed, click “edit” in the upper right box;
    Set “Enable CyberSource HOP Module” to True;
    The “Login Username” is your CyberSource Account no. (vxxxxxxxx);
    Set “Transaction mode” to “test” (to be changed to “Production” when you go LIVE);
    In “Transaction method” check the “Credit Card” button;
    Set “Collect & store the CVV number” to True;
    For “Payment Zone” select “-none-“ from the pull-down menu;
    For “Set Order Status” select “default“ from the pull-down menu;
    For “Sort Order of Display” type 0 in input box.
    Click “Update” at the bottom of the page.

    5. Install a SSLCertificate on your Zen Cart Store Host
    Install a SSL Certificate on the ZC store host or have your Host Provider do the install for you.
    Many Host Providers do not offer their shared SSL certificates to php users due to security restrictions. You may also be required by your Host Provider to obtain a dedicated IP address.

    6. CyberSource Business Center Settings
    Go to CyberSource Business Center >> Left vertical bar menu >> Settings >> Account Info;
    Under “Process Payment Transactions”, select “Hosted Order Page” from the pull-down menu;
    Under “Duplicate Order Check”, check the “Decline duplicate orders” checkbox;
    Under ‘Shopping Cart”, select “Other” in pull-down menu and type Zen Cart in the following input box;
    (Leave your CyberSource account in test mode until all your test scenarios are completed and you are ready to go LIVE)
    At the very bottom of the page, click “Update”.

    Go to CyberSource Business Center >> Left vertical bar menu >> Settings >> HOP Settings;
    Under “Payment Types”, check the “Credit Card” checkbox;
    Under “Payment Types”, check the “Visa”, Master Card”, etc. checkboxes, it is recommended that you also check the corresponding “Display/Require” checkboxes;
    Under “Payment Currencies”, one by one, in the pull-down menu, for the above selected credit cards (Visa, MC, etc.) place the proper currency name in the “Accepted Currencies” input box. Not accepted currencies should remain in the “Rejected Currencies” input box;

    Under “Receipt Page”, in the “Receipt Response URL” input box, type:
    https://yoursite/yourstore/cybersource.php?result=true
    (replacing “yoursite” and “yourstore” with proper URL info for your ZC store, if your store is located in the root directory, the “yourstore” field is not present)
    Check the following “This URL is my custom receipt page.” checkbox.

    Under “Decline Page”, in the “Decline Response URL” input box, type:
    https://yoursite/yourstore/cybersource.php?result=false
    (replacing “yoursite” and “yourstore” with proper URL info for your ZC store, if your store is located in the root directory, the “yourstore” field is not present)
    Check the following “This URL is my custom decline page.” checkbox.

    Under “Notifications”, check the “Merchant Receipt Email” checkbox and type the Store Manager e-mail address in the corresponding input box;

    Under “Notifications”, in the input box next to “Sender’s Email Address” type the Store Manager e-mail address;
    At the very bottom of the page, click “Update”.

    Go to CyberSource Business Center >> Left vertical bar menu >> Settings >> SmartAuth;
    Under “Address Verification Service”, check the “No address match” checkbox;
    Under “Card Verification Number (also known as CVV2, CVC2)”, check the “Card verification number does not match” checkbox;
    At the very bottom of the page, click “Update”.

    The above suggested settings were found to be working in my case. Different settings may also work. Experience with a working store (processing transactions in test mode or live) will certainly be the better guide to a different setting selection.

    7. Zen Cart Admin Settings
    Go to ZC Admin >> Configuration >> Credit Cards.
    The accepted credit cards should be set to a value=1 using the “edit” button;
    The non accepted credit cards should be set to a value=0 using the “edit” button;

    Should you like to display credit card images (small size) on the Step 3 of 3 page of the Checkout Process, you can set “Credit Card Enabled – Show on Payment” to value=2.
    The ZC application does not provide these images and you will need to download and prepare the “approved for Web display” images yourself (normally to 37x21 px, gif format).
    Upload the credit card images (cc1.gif for Visa, cc2.gif for MC, cc3.gif for AMEX, cc5.gif for Discover) into the “includes/templates/custom/images/icons” directory.

    8. CyberSource Return Codes (reasonCodes)
    According to the SOP User’s Guide (page 74) there are 31 reasonCodes that can be returned to the ZC store application following the processing of a transaction by the CyberSource server. You should refer to the “includes/modules/payment/cs.php” file to review the 15 or so defined error messages (see function before_process() at or near line 345). The contributor claims that is all you will need, but you can easily add reasonCode, should you need it.

    Once the reasonCode is received from the CyberSource server, the ZC application displays the corresponding text by inserting it at the very top (on top) of the Step 3 of 3 page without the familiar red background normally used to display error (it could be more visible). A successful transaction (code 100) will instead display the order receipt page.

    In CyberSource test mode, it is very difficult to see more than a few of these messages since the testing environment provided by CyberSource does not duplicate all the steps of a live transaction (i.e. no Payment Processor). You can test to your hearth’s content in live mode, if needed. Unfortunately, testing in live mode with a valid credit card brings the additional constraint of large cumulative authorization amount that renders the card unusable. Payment Gateways suggest to not capture these transactions or wait for the 30-day authorization expiry.
    ########################################################################################################################__


    The above should be all you need to know to insure your ZC/CyberSource store goes LIVE.

    If you have recently completed a ZC/CyberSource implementation project, your feedback (posts) can certainly improve the present Implementation Guidelines. The ZC Community will surely be appreciative.

    Best of luck,

    deBeaujeu

  2. #2
    Join Date
    Jan 2007
    Posts
    16
    Plugin Contributions
    0

    Default Re: CyberSource Payment Module Implementation Guidelines (SOP connection method)

    deBeaujeu,

    I followed the above instructions to a T and all my issues have been resolved. Thanks a lot for sharing this knowledge with us.

    You Rock!!

    1der_dog

  3. #3
    Join Date
    Jan 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: CyberSource Payment Module Implementation Guidelines (SOP connection method)

    Would it be possible to upload your new modified version of the cybersource payment module? I need it and if you've done all the work I would love to save some time.

  4. #4
    Join Date
    Aug 2005
    Posts
    16
    Plugin Contributions
    0

    Default Re: CyberSource Payment Module Implementation Guidelines (SOP connection method)

    Hi, I followed all your instructions as well (thank you SO MUCH for putting this walkthrough together, it saved me days and days of work), but now I'm getting an error page saying that my currency "usd" is invalid. In the archive there was mention of this, and the user solved the problem by making sure "credit card" was selected in the Cybersource Business Center under "Settings > HOP Settings". I've already done this. Can anyone offer some advice?

  5. #5
    Join Date
    Aug 2005
    Posts
    16
    Plugin Contributions
    0

    Default Re: CyberSource Payment Module Implementation Guidelines (SOP connection method)

    Update to my current problem: on a whim I changed the case of the line

    if(!isset($currency)){ $currency = "USD"; }

    in my HOP.php file to uppercase just in case that was what was causing the problem, and that didn't help.

  6. #6
    Join Date
    Aug 2006
    Location
    Kirkland, WA
    Posts
    79
    Plugin Contributions
    2

    Default Re: CyberSource Payment Module Implementation Guidelines (SOP connection method)

    You have reviewed t=34779 pertaining to the use of USD vs usd in ZC Admin >> Localization >> Currencies >> US Dollar (default)?
    The setting I have in HOP.php is: if(!isset($currency)){ $currency = "usd"; } (lowercase usd).
    It may be related to localization/multi-zones settings in ZC Admin. I am using only one zone (WA) in the USA.

    deBeaujeu

  7. #7
    Join Date
    Aug 2005
    Posts
    16
    Plugin Contributions
    0

    Default Re: CyberSource Payment Module Implementation Guidelines (SOP connection method)

    Yes, I did review the thread you mentioned and double-checked that the Credit Card option was checked.

  8. #8
    Join Date
    Aug 2005
    Posts
    16
    Plugin Contributions
    0

    Default Re: CyberSource Payment Module Implementation Guidelines (SOP connection method)

    deBeaujeu, I have all the default zones included in a previous installation of ZC/Cybersource from a year ago and I didn't have any problems with that one. Do you have any other ideas?

  9. #9
    Join Date
    Jan 2007
    Posts
    1
    Plugin Contributions
    0

    Default Re: CyberSource Payment Module Implementation Guidelines (SOP connection method)

    Hi!

    My problem is very much similar to yours:

    I have a cybersource test account which I use to test my e-commerce application:
    -When I use USD Code , order is placed successfully
    -When I use AUD,CSD,EUR,GBR,JPY code , the response that I get back from the gateways is:

    Customer has tried to pay for their order using a real-time gateway,
    but encountered an error in processing their card.
    Response Code 1 = 1
    Response Code 2 = 2
    The error returned from the processor was
    One or more fields in the request contains invalid data.
    Possible action: See the reply fields invalidField_0...N for which fields are invalid.
    Resend the request with the correct information.
    AUD

    1

    1698522130630169622532REJECT1021022

    Note: The above code means that there is a missing field when it works fine with USD code keeping all the settings the same, so why is this inconsistent
    Also is this because I have a test account , other cuurencies will not work.

  10. #10
    Join Date
    Feb 2004
    Posts
    1,278
    Plugin Contributions
    0

    Default Re: CyberSource Payment Module Implementation Guidelines (SOP connection method)

    I am having a problem.

    I had this working...

    Had to do a backup cause of a crash.
    All was set up already in CS
    I copied over the files again.

    But when I run a card. The transaction goes through, but it pulls up the url www.orderpage.ic3.com/hop/ProcessOrder.do

    And the order does not go back to zen.

    Where do I go to fix this?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Cybersource SOP --- invalid merchantID and currency
    By dm03514 in forum Addon Payment Modules
    Replies: 1
    Last Post: 11 Dec 2012, 02:05 AM
  2. AsianPay Payment Module Implementation Problem
    By marijuana in forum Addon Payment Modules
    Replies: 1
    Last Post: 7 Jun 2010, 03:28 PM
  3. Cybersource SOP Gateway Troubles
    By kcnolanjax in forum Addon Payment Modules
    Replies: 1
    Last Post: 11 Jun 2009, 08:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR