Required for this integration
- WooCommerce CyberSource Payment Gateway download here.
- CyberSource Token Management Service (used to create and manage saved payment methods for Autoship Scheduled Orders)
- Tokenization: This gateway tokenizes payment methods in a way that allows Autoship Cloud to request payment for recurring orders
- Credit Card Payments: Only credit card payments are supported with CyberSource
- CyberSource eCheck payments
- CyberSource Visa Checkout
Setting up CyberSource payments with WooCommerce in "Test" Mode
If this is your first time setting up CyberSource for WooCommerce, please see detailed steps for setting up the plugin at WooCommerce.com here.
Once you have installed and activated the CyberSource Payment Gateway plugin, you will need to enter your CyberSource API credentials into the plugin before you can start using it. To do this, navigate to WP-Admin > WooCommerce > Settings >> Payments >> CyberSource Credit Card.
Once there, you will need to ensure that "Tokenization" is enabled.
After that, you will need to fill in the following two fields with the API credentials obtained from your CyberSource account (also, keep these handy for the next section):
Note: The fields are labeled "Test Merchant Id", "Test API Key Detail", and "Test API Shared Secret Key" because the plugin is set to use the "Test Environment". You will need to supply the API keys from the CyberSource account that corresponds to the environment in which you will be using the gateway (we are starting in the "Test Environment" to ensure that the plugin is working before creating actual charges).
Once these settings have been added, select "Save changes", and complete a test order via checkout from your store to ensure that CyberSource is working in "Test Mode".
Setting up CyberSource payments with Autoship Cloud (Test Mode)
Once you have ensured that the CyberSource gateway can successfully process a test order via checkout and save a test payment method in your store, you'll need to set add the payment integration to Autoship Cloud.
To do this, navigate in your WordPress Admin to WP-Admin > Autoship Cloud > Payment Integrations. Once there, select the "Add" button (blue circle with the "+" sign in it) to add a new payment integration.
You should see the following screen:
Make sure that "Test Mode" is enabled (unless you are ready to begin using the gateway in Live mode), select the "Payment Method Type" dropdown, and then select "CyberSource v2", enter the same API credentials that you used to configure the plugin in your WooCommerce Settings to the appropriate fields.
When you have added your settings, select "CREATE".
You should now see a new CyberSource V2 payment integration in your Payment Integrations list!
Placing a Test CyberSource order as a Test Customer
Before using a payment gateway in "Live Mode", it is necessary to ensure that it works in "Test Mode" (sometimes referred to as "Sandbox Mode").
You can place a test order on your site by adding at least 1 product scheduled for Autoship to your cart and selecting CyberSource as your payment method at checkout.
Use a CyberSource test card number to test placing an order as a customer via CyberSource and saving your test payment method to pay for your Scheduled Order.
Placing your test order via CyberSource:
1. Visit your store as a customer (make sure you are logged out of the WordPress Admin)
2. Add at least 1 item scheduled for Autoship to your Cart.
3. Complete a checkout using a CyberSource test card number
4. Verify that the order has successfully processed
5. As the same customer, visit My Account > Scheduled Orders and verify that you have created a Scheduled Order, and that the products, schedule frequency, and payment method for the Scheduled Order are all correct.
6. Log back into your site as an administrator, navigate to WP-Admin > Autoship Cloud > Scheduled Orders, and verify that the newly created Scheduled Order is present in your list of Scheduled Orders and includes the CyberSource test card number (that was used at checkout).
Once you have successfully completed an Autoship checkout in "Test Mode", and verified that a Scheduled Order was created, you are ready to enter "Live Mode" (in which actual charges will be created).
To do this you will need to:
1. Create and/or log in to you Live CyberSource account (Note: this should be different than your test or "sandbox" account)
2. Navigate to WP-Admin > WooCommerce > Settings >> Payments >> CyberSource Credit Card, and enter the API credentials from your Production CyberSource account, and change the setting for Environment from "Test" to "Production". Select "Save changes".
3. Next, navigate to WP-Admin > Autoship Cloud > Payment Integrations and select "Edit" (the pencil icon) for your "CyberSource v2" integration. Replace the Test API credentials with the Live API Credentials from step 2, and uncheck the box for "Test Mode". Select "Save" to confirm your changes.
Important! Your connected QPilot Site must be set as a "Production" environment in order to be able to switch to a "Production" environment.
You are now ready to test Checkout and Scheduled Orders with Autoship Cloud.
What if my customer needs to add / update their payment method for their Scheduled Orders?
A customer may need to add a new payment method for the following reasons:
- Their existing payment method has expired or was lost/stolen.
- They want to add an additional or new saved payment method to pay for their Scheduled Orders.
Doing this is easy and only takes a few simple steps!
Adding a new payment method as a customer
1. First, the customer will login to My Account
2. Next, they will navigate to My Account > Payment Methods and select "Add Payment Method"
3. After they have entered their new payment method, they will select "Add Payment Method"
4. The newly added payment method can now be added to their Scheduled Order(s). Customers will be prompted after they add a new payment method to update their Scheduled Order(s) with the new payment method, or they can select the button to "Select to apply the payment method to your Scheduled Orders" at any time.
How customers apply an existing saved payment method to their Scheduled Orders
Customers may simply want to apply an existing saved payment method to their Scheduled Orders. They may do this in 2 ways:
Apply payment method to all Scheduled Orders: Customers can use the "cycle" button on the My Account > Payment Methods page to apply a payment method to all of their Scheduled Orders.
Apply payment method to one Scheduled Order: Customers may also visit My Account > Scheduled Orders and edit their Scheduled Order by selecting the "Edit Payment Method" button.
All of their saved payment methods will display in the "Payment Method" dropdown, so that they can select the payment method they want and then select the "Update Payment Method" button to apply the payment method to their Scheduled Order.