iFrame testing
API docs for version 1 of the Spreedly iFrame Javascript API
Many development teams utilize automated testing to test their browser-based workflows. The following functions should aid in that endeavor.
setValue
Set the value the iFrame fields to a known test value. Any values that are not on the allowed list will be silently rejected.
Spreedly.on("ready", function() {
Spreedly.setValue("number", "4111111111111111");
Spreedly.setValue("cvv", "123");
});
Signature
setValue(field, value)
Arguments
Name | Description |
---|---|
field | The iFrame field to set the value. Can be one of number or cvv . |
value | The value to set the field to. The number field will only accept test card numbers. The cvv field will only accept 12 , 123 , or 1234 |
Scheduled releases
Spreedly offers staggered, scheduled iFrame release channels for users that wish to test changes before accepting them. This can be declared in the script tag before initializing iFrame.
<head>
<script> src="https://core.spreedly.com/iframe/iframe-[desired channel].min.js" </script>
</head>
The recommended release channels are:
v1
is the most current version and is continuously updated with no set release schedule.candidate
is updated on the 1st Tuesday of every month to matchiframe-v1
stable
is updated on the 3rd Tuesday of every month to match the latest version ofiframe-candidate
iFrame Changelog RSS feed is available here: https://core.spreedly.com/iframe/feed.xml.
If you encounter issues while using these release channels, please contact support for assistance.
For merchants who are not using iframe-v1
, or iframe-stable
, Spreedly has implemented a deprecation plan for iFrame where all versions that are more than 3 months out of date will be deprecated and removed from service. This ensures that all customers are on recent versions with the latest security updates. We strongly recommended implementing one of our regularly updated release channels as they will always be up to date.
Updated 15 days ago