It a a web Services API written in Java.
Below is an example of the API. I need to get the results from the PHP shopping cart into this. Any help would be appreciated.
package com.cybersource.sample;
import java.util.*;
import com.cybersource.ws.client.*;
public class SimpleAuthSample
{
public static void main( String[] args )
{
Properties props = Utility.readProperties( args );
HashMap request = new HashMap();
// we want to do Credit Card Authorization in this sample
request.put( "ccAuthService_run", "true" );
// add required fields
request.put( "merchantReferenceCode", "MRC-14344" );
request.put( "billTo_firstName", "Jane" );
request.put( "billTo_lastName", "Smith" );
request.put( "billTo_street1", "1295 Charleston Road" );
request.put( "billTo_city", "Mountain View" );
request.put( "billTo_state", "CA" );
request.put( "billTo_postalCode", "94043" );
request.put( "billTo_country", "US" );
request.put( "billTo_email", "jsmith@example.com" );
request.put( "card_accountNumber", "4111111111111111" );
request.put( "card_expirationMonth", "12" );
request.put( "card_expirationYear", "2010" );
request.put( "purchaseTotals_currency", "USD" );
// there are two items in this sample
request.put( "item_0_unitPrice", "12.34" );
request.put( "item_1_unitPrice", "56.78" );
// add optional fields here according to your business needs
// See Using the Decision and Reason Code
// for details about processing the reply
try
{
HashMap reply = Client.runTransaction( request, props );
}
catch (ClientException e) {
if (e.isCritical())
{
handleCriticalException( e, request );
}
}
catch (FaultException e) {
if (e.isCritical())
{
handleCriticalException( e, request );
}
}
}
}