Testing the Plugin
After you configure and activate the Stripe plugin, you can test that the plugin works by making a purchase.
- Browse to Cortex Studio.
- Authenticate as a public user
- Add an item to cart.
- Add an email address.
- Add a billing address.
- Click on
paymentmethodinfo
. - Zoom into
element
and find the Stripe payment method, then click the link. - Click on
requestinstructionsform
. - Click the
requestpaymentinstructionsaction
button. - Write down the
client_secret
andcustomer_id
values.
- Browse to the Elastic Path Stripe Payment Flow test harness.
- In “Public API Key”, enter the publishable key from your Stripe dashboard.
- In “Client Secret ID”, enter the
client_secret
value you wrote down. - Click “Start”.
- Fill in the payment details and click "Submit".
- Write down the
payment_method
value.
- Go back to Cortex Studio.
- Click "Back" twice on your browser.
- Click on “paymentinstrumentform”.
- In “customer_id”, enter the
customer_id
value you wrote down. - In “display-name”, enter any value, such as “Test Card”.
- In “payment_method_id”, enter the
payment_method
value you wrote down. - Click “createpaymentinstrumentaction”.
- Complete the purchase.
- Browse to the Stripe Dashboard.
- Click the “Payments” option at the top of the page.
- The first payment in the list should be the one you just created.