Skip to content
This repository has been archived by the owner on Jun 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #6 from sopherapps/develop
Browse files Browse the repository at this point in the history
Develop - Poll for status of transaction at intervals not less than 30 seconds
  • Loading branch information
Tinitto authored Jun 4, 2019
2 parents 3f7bd2d + 5df172b commit e230b26
Show file tree
Hide file tree
Showing 33 changed files with 224 additions and 147 deletions.
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,15 @@ before_script:

script:
- npm run test

deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: docs
verbose: true
on:
branch: master

before_deploy:
- touch docs/.nojekyll
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ __For the production environment, the API user ID and API Key are obtained throu
apiuserId: 'Your Api user ID',
apiKey: 'Your Api user key',
timeout: 35000, // the time in milliseconds for polling status to time out; default: 35000
interval: 31000, // the interval at which status is polled in ms: defaults to 30000; never goes below 30000
baseURL: 'The baseURL of the API. Get it from the official API docs',
authBaseURL: 'The baseURL of the /token endpoint for the given product', // Go to API docs
resourceUrl: resourceUrlsMap[transactionType],
Expand Down
19 changes: 19 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
set -e

# build docs
npm run typedoc

# navigate into the docs directory
cd docs

# add .nojekyll
touch .nojekyll

git init
git add -A
git commit -m 'deploy'

# if you are deploying to https://<USERNAME>.github.io/<REPO>
git push -f [email protected]:sopherapps/mtn-pay-js.git master:gh-pages

cd -
2 changes: 1 addition & 1 deletion docs/assets/js/search.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions docs/classes/_account_index_.account.html
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ <h3>constructor</h3>
<aside class="tsd-sources">
<p>Overrides <a href="_core_index_.baseproduct.html">BaseProduct</a>.<a href="_core_index_.baseproduct.html#constructor">constructor</a></p>
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/account/index.ts#L18">account/index.ts:18</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/account/index.ts#L18">account/index.ts:18</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1044,7 +1044,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> account<wbr>Resource</h
<div class="tsd-signature tsd-kind-icon">account<wbr>Resource<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_utils_repository_.iresource.html" class="tsd-signature-type">IResource</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/account/index.ts#L18">account/index.ts:18</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/account/index.ts#L18">account/index.ts:18</a></li>
</ul>
</aside>
</section>
Expand All @@ -1055,7 +1055,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> api<wbr>Token</h3>
<aside class="tsd-sources">
<p>Inherited from <a href="_core_index_.baseproduct.html">BaseProduct</a>.<a href="_core_index_.baseproduct.html#apitoken">apiToken</a></p>
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/core/index.ts#L26">core/index.ts:26</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/core/index.ts#L26">core/index.ts:26</a></li>
</ul>
</aside>
</section>
Expand All @@ -1066,7 +1066,7 @@ <h3>common<wbr>Headers</h3>
<aside class="tsd-sources">
<p>Inherited from <a href="_core_index_.baseproduct.html">BaseProduct</a>.<a href="_core_index_.baseproduct.html#commonheaders">commonHeaders</a></p>
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/core/index.ts#L20">core/index.ts:20</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/core/index.ts#L20">core/index.ts:20</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
Expand All @@ -1093,7 +1093,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> details</h3>
<div class="tsd-signature tsd-kind-icon">details<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_account_types_.iaccountdetails.html" class="tsd-signature-type">IAccountDetails</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/account/index.ts#L17">account/index.ts:17</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/account/index.ts#L17">account/index.ts:17</a></li>
</ul>
</aside>
</section>
Expand All @@ -1103,7 +1103,7 @@ <h3>last<wbr>Modified</h3>
<div class="tsd-signature tsd-kind-icon">last<wbr>Modified<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/account/index.ts#L16">account/index.ts:16</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/account/index.ts#L16">account/index.ts:16</a></li>
</ul>
</aside>
</section>
Expand All @@ -1121,7 +1121,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> authenticate</h3>
<aside class="tsd-sources">
<p>Inherited from <a href="_core_index_.baseproduct.html">BaseProduct</a>.<a href="_core_index_.baseproduct.html#authenticate">authenticate</a></p>
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/core/index.ts#L57">core/index.ts:57</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/core/index.ts#L57">core/index.ts:57</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -1143,7 +1143,7 @@ <h3>get<wbr>Details</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/account/index.ts#L31">account/index.ts:31</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/account/index.ts#L31">account/index.ts:31</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1167,7 +1167,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> seconds<wbr>Since</
<aside class="tsd-sources">
<p>Inherited from <a href="_core_index_.baseproduct.html">BaseProduct</a>.<a href="_core_index_.baseproduct.html#secondssince">secondsSince</a></p>
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/core/index.ts#L86">core/index.ts:86</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/core/index.ts#L86">core/index.ts:86</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1198,7 +1198,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> should<wbr>Authenti
<aside class="tsd-sources">
<p>Inherited from <a href="_core_index_.baseproduct.html">BaseProduct</a>.<a href="_core_index_.baseproduct.html#shouldauthenticate">shouldAuthenticate</a></p>
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/core/index.ts#L74">core/index.ts:74</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/core/index.ts#L74">core/index.ts:74</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
14 changes: 7 additions & 7 deletions docs/classes/_core_index_.baseproduct.html
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/core/index.ts#L27">core/index.ts:27</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/core/index.ts#L27">core/index.ts:27</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1067,7 +1067,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> api<wbr>Token</h3>
<div class="tsd-signature tsd-kind-icon">api<wbr>Token<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_core_types_.iapitoken.html" class="tsd-signature-type">IApiToken</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/core/index.ts#L26">core/index.ts:26</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/core/index.ts#L26">core/index.ts:26</a></li>
</ul>
</aside>
</section>
Expand All @@ -1077,7 +1077,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> auth<wbr>Resource</h3>
<div class="tsd-signature tsd-kind-icon">auth<wbr>Resource<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_utils_repository_.iresource.html" class="tsd-signature-type">IResource</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/core/index.ts#L27">core/index.ts:27</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/core/index.ts#L27">core/index.ts:27</a></li>
</ul>
</aside>
</section>
Expand All @@ -1087,7 +1087,7 @@ <h3>common<wbr>Headers</h3>
<div class="tsd-signature tsd-kind-icon">common<wbr>Headers<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/core/index.ts#L20">core/index.ts:20</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/core/index.ts#L20">core/index.ts:20</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
Expand Down Expand Up @@ -1121,7 +1121,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> authenticate</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/core/index.ts#L57">core/index.ts:57</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/core/index.ts#L57">core/index.ts:57</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -1143,7 +1143,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> seconds<wbr>Since</
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/core/index.ts#L86">core/index.ts:86</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/core/index.ts#L86">core/index.ts:86</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1173,7 +1173,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> should<wbr>Authenti
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/core/index.ts#L74">core/index.ts:74</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/core/index.ts#L74">core/index.ts:74</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
22 changes: 11 additions & 11 deletions docs/classes/_sandboxapiuser_index_.sandboxapiuser.html
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/sandboxApiUser/index.ts#L24">sandboxApiUser/index.ts:24</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/sandboxApiUser/index.ts#L24">sandboxApiUser/index.ts:24</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1064,7 +1064,7 @@ <h3>api<wbr>Key</h3>
<div class="tsd-signature tsd-kind-icon">api<wbr>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> =&nbsp;&quot;&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/sandboxApiUser/index.ts#L19">sandboxApiUser/index.ts:19</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/sandboxApiUser/index.ts#L19">sandboxApiUser/index.ts:19</a></li>
</ul>
</aside>
</section>
Expand All @@ -1074,7 +1074,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> apikey<wbr>Resource</h3
<div class="tsd-signature tsd-kind-icon">apikey<wbr>Resource<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_utils_repository_.iresource.html" class="tsd-signature-type">IResource</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/sandboxApiUser/index.ts#L24">sandboxApiUser/index.ts:24</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/sandboxApiUser/index.ts#L24">sandboxApiUser/index.ts:24</a></li>
</ul>
</aside>
</section>
Expand All @@ -1084,7 +1084,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> apiuser<wbr>Resource</h
<div class="tsd-signature tsd-kind-icon">apiuser<wbr>Resource<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_utils_repository_.iresource.html" class="tsd-signature-type">IResource</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/sandboxApiUser/index.ts#L23">sandboxApiUser/index.ts:23</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/sandboxApiUser/index.ts#L23">sandboxApiUser/index.ts:23</a></li>
</ul>
</aside>
</section>
Expand All @@ -1094,7 +1094,7 @@ <h3>provider<wbr>Callback<wbr>Host</h3>
<div class="tsd-signature tsd-kind-icon">provider<wbr>Callback<wbr>Host<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> =&nbsp;&quot;&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/sandboxApiUser/index.ts#L20">sandboxApiUser/index.ts:20</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/sandboxApiUser/index.ts#L20">sandboxApiUser/index.ts:20</a></li>
</ul>
</aside>
</section>
Expand All @@ -1104,7 +1104,7 @@ <h3>reference<wbr>Id</h3>
<div class="tsd-signature tsd-kind-icon">reference<wbr>Id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/sandboxApiUser/index.ts#L22">sandboxApiUser/index.ts:22</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/sandboxApiUser/index.ts#L22">sandboxApiUser/index.ts:22</a></li>
</ul>
</aside>
</section>
Expand All @@ -1114,7 +1114,7 @@ <h3>target<wbr>Environment</h3>
<div class="tsd-signature tsd-kind-icon">target<wbr>Environment<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> =&nbsp;&quot;&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/sandboxApiUser/index.ts#L21">sandboxApiUser/index.ts:21</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/sandboxApiUser/index.ts#L21">sandboxApiUser/index.ts:21</a></li>
</ul>
</aside>
</section>
Expand All @@ -1131,7 +1131,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> get<wbr>Remote<wbr>Api<
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/sandboxApiUser/index.ts#L91">sandboxApiUser/index.ts:91</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/sandboxApiUser/index.ts#L91">sandboxApiUser/index.ts:91</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -1150,7 +1150,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> get<wbr>Remote<wbr>User
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/sandboxApiUser/index.ts#L103">sandboxApiUser/index.ts:103</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/sandboxApiUser/index.ts#L103">sandboxApiUser/index.ts:103</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -1169,7 +1169,7 @@ <h3>get<wbr>User</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/sandboxApiUser/index.ts#L69">sandboxApiUser/index.ts:69</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/sandboxApiUser/index.ts#L69">sandboxApiUser/index.ts:69</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -1193,7 +1193,7 @@ <h3>initialize</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/f82c924/src/sandboxApiUser/index.ts#L53">sandboxApiUser/index.ts:53</a></li>
<li>Defined in <a href="https://github.com/sopherapps/mtn-pay-js/blob/dc47043/src/sandboxApiUser/index.ts#L53">sandboxApiUser/index.ts:53</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
Loading

0 comments on commit e230b26

Please sign in to comment.