|
| 1 | +# cybersource-sdk-cplusplus |
| 2 | + |
| 3 | +[] |
| 4 | +(https://travis-ci.com/CyberSource/cybersource-sdk-cplusplus) |
| 5 | + |
| 6 | +CyberSource C++ SDK for windows |
| 7 | +##Requirements |
| 8 | +###Windows |
| 9 | +1. Visual Studio 2012 |
| 10 | +2. gsoap 2.8 |
| 11 | + |
| 12 | +###Linux |
| 13 | +1. g++ (GCC) 4.8.3 |
| 14 | +2. gsoap 2.8 |
| 15 | + |
| 16 | +##Prerequisites |
| 17 | +1. Registration |
| 18 | +A CyberSource Evaluation account is required. Sign up here: http://www.cybersource.com/register |
| 19 | +Complete your Evaluation account creation by following the instructions in the Registration email |
| 20 | + |
| 21 | +2. Transaction Security Keys |
| 22 | +Create security keys in the Enterprise Business Center (ebctest) after you've created your Merchant Admin account. |
| 23 | +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. |
| 24 | + |
| 25 | +##Installing & building the SDK |
| 26 | +###Windows |
| 27 | +1. Download the cybersource-sdk-cpp-master.zip package into a directory of your choice. |
| 28 | +2. Extract and go to the cybersource-sdk-cpp directory. |
| 29 | +3. Open Solution "client.sln" in Visual Studio. |
| 30 | +4. Build/Rebuild the Solution. |
| 31 | +5. To generate binary run mkinstall.bat win32 or mkinstall.bat win64 to build 32 bit or 64 bit respectively. |
| 32 | + |
| 33 | +###Linux |
| 34 | +1. Download the cybersource-sdk-cpp-master.zip package into a directory of your choice. |
| 35 | +2. Extract and go to the cybersource-sdk-cpp directory. |
| 36 | +3. Run "make clean" to clean up the old build/binaries. |
| 37 | +4. Run "make build32" or "make build64" to build 32 or 64 bit respectively. |
| 38 | +5. Navigate to xml sample folder and run compile.sh |
| 39 | +6. Navigate to NVPTest sample folder and run compile.sh |
| 40 | +5. Run "make dist" to generate tar. |
| 41 | +6. Binaries will be generated in /builds/simapi-c-linux-6.0.0.tar.gz. |
| 42 | + |
| 43 | +##Running the Samples |
| 44 | +1. Edit cybs.ini (\samples\cybs.ini) |
| 45 | + |
| 46 | +* 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. |
| 47 | + |
| 48 | +* keysDirectory. Location of the merchant’s security key. |
| 49 | + |
| 50 | +* keyFilename. Name of the merchant p12 file (e.g merchant.p12). If not specified then by-default it takes <merchantID>.p12 as the value. |
| 51 | + |
| 52 | +* password. Password of merchant p12 file. If not specified then by-default it uses merchantID as the password. |
| 53 | + |
| 54 | +* enableLog. If set to true then it will create a log file and log the transaction details. |
| 55 | + |
| 56 | +* logDirectory. Path of the log file directory. |
| 57 | + |
| 58 | +* logFilename. Name of the log file. |
| 59 | + |
| 60 | +* 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. |
| 61 | + |
| 62 | +* useSignAndEncrypted. This is a boolean flag, if set to true then request will be both signed as well as encrypted. |
| 63 | + |
| 64 | +* sendToAkamai. This is a boolean flag, if set to true, the request will be routed through Amamai to CyberSource. |
| 65 | + |
| 66 | +* sendToProduction. This is a boolean flag, if set to true the request will be sent to production endpoint. |
| 67 | + |
| 68 | +* serverURL. This config parameter will take precedence over sendToProduction and sendToAkamai config parameters. By default, the "serverURL" configuration is commented out. |
| 69 | + |
| 70 | +2. Running XML request |
| 71 | +Go to \samples\xml in command prompt and run XMLTest.exe. |
| 72 | + |
| 73 | +3. Running NVP request |
| 74 | +Go to \samples\nvp in command prompt and run NVPTest.exe |
| 75 | + |
| 76 | +For running the sample follow "Running the Samples" section. |
| 77 | + |
| 78 | +##Generating stub code for different wsdl version: |
| 79 | +1. Go to /stub_generator. |
| 80 | +2. copy the wsdl for particular version from "https://ics2wsa.ic3.com/commerce/1.x/transactionProcessor/" to NVP or XML. |
| 81 | +3. Run stub_generator.bat for windows or stub_generator.sh for linux and follow the instruction. |
| 82 | +4. Rebuild the SDK. Follow Installing & building the SDK |
| 83 | + |
| 84 | + |
0 commit comments