Testing
After you configure and activate the CyberSource plugin, you can test that the plugin works by making a purchase. First prepare the order, then follow the procedure for your method.
Preparing the order
- 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 payment method whose
nameis your CyberSource configuration name.
Testing Microform
Before you start, make sure that the Microform configuration's STOREFRONT_BASE_URLS includes https://ep-cortex.com, the base URL of the test page.
- Prepare the order as described in Preparing the order.
- Follow the
requestinstructionsformlink. - Click
requestpaymentinstructionsaction. - Copy the whole response from the "Raw Response" tab.
- In a separate window, browse to CyberSource Payment Test, select the "Microform" tab, and paste in the response.
- Click "Load" to load the card number and security code fields.
- Enter the following:
Card Number:4111111111111111Security Code:123Expiration Month:01Expiration Year:2030(or any year in the future)
- Click "Get token".
- Copy the transient token, which expires after 15 minutes.
- Return to Cortex Studio.
- Click on "Shopper's Current Order", then follow the
paymentmethodinfolink. - Add a zoom for
elementand submit. - Search for the payment method whose
nameis your CyberSource configuration name. - Follow the
paymentinstrumentformlink. - Fill in these fields:
display-name:Test Cardtransient-token: The transient token that you copied.billing-address:country-name:CAlocality:Vancouverpostal-code:V5V4N1region:BCstreet-address:123 Main Streetfamily-name:Smithgiven-name:John
- Click
createpaymentinstrumentaction. - Complete the purchase.
- Verify the transaction in the CyberSource admin console.
Testing Unified Checkout
Before you start, make sure that the Unified Checkout configuration's STOREFRONT_BASE_URLS includes https://ep-cortex.com, the base URL of the test page.
- Prepare the order as described in Preparing the order.
- Follow the
requestinstructionsformlink. - Fill in
countrywithCA. - Click
requestpaymentinstructionsaction. - Copy the whole response from the "Raw Response" tab.
- In a separate window, browse to CyberSource Payment Test, select the "Unified Checkout" tab, and paste in the response.
- Click "Load" to show the CyberSource card form on the page.
- Enter the card
4111111111111111, a future expiry date, a security code and a billing address, and submit the card form. - Copy the transient token, which expires after 15 minutes.
- Return to Cortex Studio.
- Click on "Shopper's Current Order", then follow the
paymentmethodinfolink. - Add a zoom for
elementand submit. - Search for the payment method whose
nameis your CyberSource configuration name. - Follow the
paymentinstrumentformlink. - Fill in these fields:
display-name:Test Cardtransient-token: The transient token that you copied.
- Click
createpaymentinstrumentaction. - Complete the purchase.
- Verify the transaction in the CyberSource admin console.
Testing Direct Post and Hosted Page (deprecated)
- Prepare the order as described in Preparing the order.
- 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 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 payment method whose
nameis your CyberSource configuration name. - 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.