@cybersource/flex-sdk-web
Version:
Easily create payment tokens using Flex API
997 lines (263 loc) • 11.4 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Module: @cybersource/flex-sdk-web</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Module: @cybersource/flex-sdk-web</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".createToken"><span class="type-signature">(static) </span>createToken<span class="signature">(createTokenOptions, responseHandler)</span><span class="type-signature"> → {Void}</span></h4>
<div class="description">
<p>Create a token using the Flex API.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>createTokenOptions</code></td>
<td class="type">
<span class="param-type">createTokenOptions</span>
</td>
<td class="description last"><p><a href="module-@cybersource_flex-sdk-web.html#~createTokenOptions">Options</a> for creating a token</p></td>
</tr>
<tr>
<td class="name"><code>responseHandler</code></td>
<td class="type">
<span class="param-type">responseHandler</span>
</td>
<td class="description last"><p><a href="module-@cybersource_flex-sdk-web.html#~responseHandler">Callback</a> that handles the response</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Void</span>
</dd>
</dl>
<h4 class="name" id=".isBrowserSupported"><span class="type-signature">(static) </span>isBrowserSupported<span class="signature">()</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
<p>Test that Flex Will work in current browser</p>
</div>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id=".nativeCryptoSupport"><span class="type-signature">(static) </span>nativeCryptoSupport<span class="signature">()</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
<p>Test that current browser has native crypto support</p>
</div>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h3 class="subsection-title">Type Definitions</h3>
<h4 class="name" id="~createTokenOptions">createTokenOptions</h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>kid</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>KeyId of the Flex public key to be used in this operation</p></td>
</tr>
<tr>
<td class="name"><code>encryptionType</code></td>
<td class="type">
<span class="param-type">'None'</span>
|
<span class="param-type">'RsaOaep'</span>
|
<span class="param-type">'RsaOaep256'</span>
</td>
<td class="description last"><p>Encryption Type. This must match the type specified during the key's generation</p></td>
</tr>
<tr>
<td class="name"><code>keystore</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>JWK formatted keystore. Not required for <code>encryptionType: 'None'</code></p></td>
</tr>
<tr>
<td class="name"><code>cardInfo</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>Card information</p>
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>cardNumber</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>Card Number sent as a string</p></td>
</tr>
<tr>
<td class="name"><code>cardType</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>CyberSource card type code - three digit string</p></td>
</tr>
<tr>
<td class="name"><code>cardExpirationMonth</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>Card Expiration Month - two digit string including leading zeros</p></td>
</tr>
<tr>
<td class="name"><code>cardExpirationYear</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>Card Expiration Year - four digit string</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h4 class="name" id="~responseHandler"><span class="type-signature"></span>responseHandler<span class="signature">(response)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>response</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>the response</p>
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>token</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>A Flex Token response if the callback has been successful</p></td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>An error message will be displayed if an error occurs</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-@cybersource_flex-sdk-web.html">@cybersource/flex-sdk-web</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Apr 08 2020 18:23:23 GMT+0100 (GMT Daylight Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>