This LibSys repository is a hard fork and heavily modified and pruned version of the CyberSource working code sample which demonstrates Ruby integration with the CyberSource REST APIs through the CyberSource Ruby SDK.
- Ruby 2.2.2 or higher
- CyberSource Account
- CyberSource API Keys
- Clone this repository:
$ git clone https://github.com/sul-dlss/cybersource-rest-ruby
- Install the gems
$ bundle
- Run the test report:
$ SLEEP=0 rspec
kubectl -n ${namespace} apply -f pv-volume.yaml
Configure the MERCHANT_KEY_ID
and MERCHANT_SECRET_KEY
variables in the environment The variables for STAGE
, APP_PASSWORD
(for folio) and APP_USERNAME
are configured using the db-connect-modules
folio secret.
Obtain the merchantsecretKey
and merchantKeyId
from the CyberSource Business Center.
You will need permissions from [email protected] to access the CyberSource Business Center
with the option to generate security keys.
apiVersion: v1
kind: Secret
metadata:
name: cybersource
type: Opaque
data:
MERCHANT_KEY_ID: base64 encoded accessKey
MERCHANT_SECRET_KEY: base64 encoded secretKey
EMAIL_REPORT_TO: base64 encoded comma-seperatred list of email addresses
Then:
kubectl -n ${namespace} apply -f secret.yaml
Edit the sendmail.yaml, sendmail.mc: SMART_HOST
entry to be the cluster mail host.
kubectl -n ${namespace} apply -f sendmail.yaml
kubectl -n ${namespace} apply -f cronjob.yaml
kubectl -n ${namespace} apply -f debug.yaml
Give sendmail a couple of minutes to restart before checking the /home/harvester/harvestlog directory.
CyberSource maintains a complete sandbox environment for testing and development purposes. This sandbox environment is an exact
duplicate of our production environment with the transaction authorization and settlement process simulated. By default, this sample code is
configured to communicate with the sandbox environment.
To switch to the sandbox environment, set the CYBS_ENV=sandbox
environment variable.
The API Reference Guide provides examples of what information is needed for a particular request and how that information would be formatted. Using those examples, you can easily determine what methods would be necessary to include that information in a request using this SDK.