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
emailinfolink. - Follow the
emailformlink. - Fill in these fields:
email:bob@sample.com
- Click
createemailaction. - Click on "Shopper's Current Order", then follow the
billingaddressinfolink. - Follow the
addressformlink. - Fill in these fields:
country-name:CAlocality:Vancouverpostal-code:V5V4N1region:BCstreet-address:123 Main Streetfamily-name:Smithgiven-name:John
- Click
createaddressaction. - Click on "Shopper's Current Order", then follow the
paymentmethodinfolink. - Add a zoom for
elementand submit. - Search for the "CyberSource" payment method.
- Follow the
requestinstructionsformlink. - Fill in these fields:
country-name:CAlocality:Vancouverpostal-code:V5V4N1region:BCstreet-address:123 Main Streetfamily-name:Smithgiven-name:Johncancel-href:https://httpbin.org/postreturn-href:https://httpbin.org/post
- Click
requestpaymentinstructionsaction. - Copy the
payloaddetails from the response. Do not include thepayloadfield 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
payloadresponse. - Click the "Submit" button.
- On the next page, enter the following:
Card Number:4111111111111111Expiration Month:01Expiration Year:2028(or any year in the future)
- Click "Next" and then "Finish".
- The response JSON should now be visible on the
httpbin.orgsite. Ensure that thedecisioncontainsACCEPT. - Copy the
payment_tokenvalue. - Return to Cortex Studio.
- Click on "Shopper's Current Order", then follow the
paymentmethodinfolink. - Add a zoom for
elementand submit. - Search for the "CyberSource" payment method.
- Follow the
paymentinstrumentformlink. - Fill in these fields:
display-name:Test Cardtoken: The value you copied from thepayment_tokenvalue in the response.
- Click
createpaymentinstrumentaction. - Complete the purchase.
- Verify the transaction in the CyberSource admin console.