[] (https://travis-ci.org/CyberSource/cybersource-sdk-cplusplus)
CyberSource C++ SDK
- Visual Studio 2012
- gsoap 2.8
- g++ (GCC) 4.8.3
- gsoap 2.8
-
Registration A CyberSource Evaluation account is required. Sign up here: http://www.cybersource.com/register Complete your Evaluation account creation by following the instructions in the Registration email
-
Transaction Security Keys Create security keys in the Enterprise Business Center (ebctest) after you've created your Merchant Admin account. Refer to our Developer's Guide for details http://apps.cybersource.com/library/documentation/dev_guides/security_keys/creating_and_using_security_keys.pdf> under Simple Order API Security Keys to generate .P12 key.
- Download the cybersource-sdk-cpp-master.zip package into a directory of your choice.
- Extract and go to the cybersource-sdk-cpp directory.
- Open Solution "client.sln" in Visual Studio.
- Build/Rebuild the Solution.
- To generate binary run mkinstall.bat win32 or mkinstall.bat win64 to build 32 bit or 64 bit respectively.
- Download the cybersource-sdk-cpp-master.zip package into a directory of your choice.
- Extract and go to the cybersource-sdk-cpp directory.
- Run "make clean" to clean up the old build/binaries.
- Follow Step 5 or Step 6 to build 32 or 64 bit respectively.
- To build 32 bit
- Run "make build32"
- Navigate to xml sample folder and run "compile.sh 32".
- Navigate to nvp sample folder and run "compile.sh 32".
- Run "make dist32" to generate tar.
- To build 64 bit
- Run "make build64"
- Navigate to xml sample folder and run "compile.sh 64".
- Navigate to nvp sample folder and run "compile.sh 64".
- Run "make dist64" to generate tar.
- Binaries will be generated in /builds/simapi-c-linux-6.0.0.tar.gz.
- Edit cybs.ini (\samples\cybs.ini)
-
merchantID. MerchantID that will be used for ending the request. If both config as well as request message don’t have the value, then error will be thrown.
-
keysDirectory. Location of the merchant’s security key.
-
keyFilename. Name of the merchant p12 file (e.g merchant.p12). If not specified then by-default it takes .p12 as the value.
-
password. Password of merchant p12 file. If not specified then by-default it uses merchantID as the password.
-
enableLog. If set to true then it will create a log file and log the transaction details.
-
logDirectory. Path of the log file directory.
-
logFilename. Name of the log file.
-
sslCertFile. Path of the SSL ca bundle certificate file (e.g C:\certfile\ca-bundle.crt). If not specified, then it will look into keysDirectory location for a file name ca-bundle.crt.
-
useSignAndEncrypted. This is a boolean flag, if set to true then request will be both signed as well as encrypted.
-
sendToAkamai. This is a boolean flag, if set to true, the request will be routed through Amamai to CyberSource.
-
sendToProduction. This is a boolean flag, if set to true the request will be sent to production endpoint.
-
serverURL. This config parameter will take precedence over sendToProduction and sendToAkamai config parameters. By default, the "serverURL" configuration is commented out.
-
Running XML request Go to \samples\xml in command prompt and run XMLTest.exe.
-
Running NVP request Go to \samples\nvp in command prompt and run NVPTest.exe
For running the sample follow "Running the Samples" section.
NOTE:To run NVPTest samples,Please provide a test account number instead of masked account number"xxxxx" in NVPTest.cpp file else transaction fails.
Meta Key is a key generated by an entity that can be used to authenticate on behalf of other entities provided that the entity which holds key is a parent entity or associated as a partner.
SOAPI Cplusplus SDK supports meta key by default. Additional detail regarding cybs.ini changes.
merchantID=<comment/remove this line> and send merchantID in request.
keysDirectory=<Directory where .p12 is present>
keyPassword=<Password of .p12 file>
keyFilename=<Downloaded meta key file for portfolio or Account MID>
- Go to /stub_generator.
- copy the wsdl for particular version from "https://ics2wsa.ic3.com/commerce/1.x/transactionProcessor/" to NVP or XML.
- Run stub_generator.bat for windows or stub_generator.sh for linux and follow the instruction.
- Rebuild the SDK. Follow Installing & building the SDK