Testing
After you configure and activate the CyberSource plugin, you can test that the plugin works by making a purchase as described below:
- Use Cortex Studio to create a public access token.
- Add any item to the cart.
- Click on "Shopper's Current Order", then follow the
emailinfo
link. - Follow the
emailform
link. - Fill in these fields:
email
:bob@sample.com
- Click
createemailaction
. - Click on "Shopper's Current Order", then follow the
billingaddressinfo
link. - Follow the
addressform
link. - Fill in these fields:
country-name
:CA
locality
:Vancouver
postal-code
:V5V4N1
region
:BC
street-address
:123 Main Street
family-name
:Smith
given-name
:John
- Click
createaddressaction
. - Click on "Shopper's Current Order", then follow the
paymentmethodinfo
link. - Add a zoom for
element
and submit. - Search for the "CyberSource" payment method.
- Follow the
requestinstructionsform
link. - Fill in these fields:
country-name
:CA
locality
:Vancouver
postal-code
:V5V4N1
region
:BC
street-address
:123 Main Street
family-name
:Smith
given-name
:John
cancel-href
:https://httpbin.org/post
return-href
:https://httpbin.org/post
- Click
requestpaymentinstructionsaction
. - Copy the
payload
details from the response. Do not include thepayload
field name itself. Make sure to do this from the "Raw Response" tab so that the keys are quoted properly. - In a separate window, browse to CyberSource Secure Acceptance Payment Test, select either "Hosted Payment Page" or "Direct Post" depending on which plugin you are using, and paste in the
payload
response. - Click the "Submit" button.
- On the next page, enter the following:
Card Number
:4111111111111111
Expiration Month
:01
Expiration Year
:2028
(or any year in the future)
- Click "Next" and then "Finish".
- The response JSON should now be visible on the
httpbin.org
site. Ensure that thedecision
containsACCEPT
. - Copy the
payment_token
value. - Return to Cortex Studio.
- Click on "Shopper's Current Order", then follow the
paymentmethodinfo
link. - Add a zoom for
element
and submit. - Search for the "CyberSource" payment method.
- Follow the
paymentinstrumentform
link. - Fill in these fields:
display-name
:Test Card
token
: The value you copied from thepayment_token
value in the response.
- Click
createpaymentinstrumentaction
. - Complete the purchase.
- Verify the transaction in the CyberSource admin console.