Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@dintero/checkout-web-sdk
Advanced tools
Use this SDK in your frontend application to
Note that this SDK is for redirecting or embedding existing payment sessions. You cannot use this SDK to send requests to the Checkout API or to crate new payment sessions.
Learn more about the Dintero Checkout at docs.dintero.com
We cannot guarantee the delivery of events from the embedded checkout to the SDK client runtime. The sessions machine-to-machine callback_url
will be delivered at least once. Read more about the callback_url parameter in our api spec.
For payments on devices with the Vipps app installed, after payment is completed in the Vipps app, the end user will be returned to the browser where the return_url
on the payment is opened in a ew browser tab leaving the site that has the embedded checkout still open in a background browser tab on the device. In this case the SDK cannot guarantee that the handlers for onPaymentAuthorized
or onPaymentError
will be called.
If no custom handler are added for onPaymentError
, onPaymentAuthorized
and onPaymentCanceled
the SDK will redirect the user to the return_url
in the payment session.
NPM package
npm install @dintero/checkout-web-sdk
unpkg
Load the Dintero Checkout SDK in a script tag on your site.
<script src="https://unpkg.com/@dintero/checkout-web-sdk@0.0.5/dist/checkout-web-sdk.umd.js" integrity="sha384-N+KaZnQwHH9GlLXQiwAM6U7iHtqWdzlCi878pBr+/swGAe53x/guPM3VZ3l4gru+"></script>
The Dintero Checkout will be added to the <div id="checkout-container"></div>
DOM-node.
The checkout sdk will add a polyfill for promises if the browser does not support promises natively.
<script type="text/javascript">
const container = document.getElementById("#checkout-container");
dintero
.embed({
container,
sid: "T11223344.<short-uuid>",
onSession: function(event, checkout) {
console.log("session", event.session);
},
onSessionPaymentAuthorized: function(event, checkout) {
console.log("transaction_id", event.transaction_id);
console.log("href", event.href);
checkout.destroy();
},
onSessionPaymentError: function(event, checkout) {
console.log("href", event.href);
checkout.destroy();
},
onSessionCancel: function(event, checkout) {
console.log("href", event.href);
checkout.destroy();
},
})
.then(function(checkout) {
console.log("checkout", checkout);
});
</script>
import {
dintero,
SessionLoaded,
SessionUpdated,
SessionPaymentAuthorized,
SessionPaymentError,
SessionCancel,
} from "dintero-checkout-web-sdk";
const container = document.getElementById("#checkout-container");
const checkout = await dintero.embed({
container,
sid: "T11223344.<short-uuid>",
onSession: (event: SessionLoaded | SessionUpdated) => {
console.log("session", event.session);
},
onSessionPaymentAuthorized: (event: SessionPaymentAuthorized) => {
console.log("transaction_id", event.transaction_id);
console.log("href", event.href);
checkout.destroy();
},
onSessionPaymentError: (event: SessionPaymentError) => {
console.log("href", event.href);
checkout.destroy();
},
onSessionCancel: (event: SessionCancel) => {
console.log("href", event.href);
checkout.destroy();
},
});
The user is redirected to the Dintero Checkout to complete payment.
import { dintero, SessionPaymentAuthorized } from "dintero-checkout-web-sdk";
const checkout = dintero.redirect({
sid: "T11223344.<short-uuid>",
});
Bugs can be reported to https://github.com/dintero/checkout-web-sdk/issues
Contact us at security@dintero.com
All major browsers above version N - 1
, where N
is the most recent version. For Internet Explorer, only version 11 is supported.
The SDK includes a polyfill for promises that is added to the global scope if promises is not supported by the browser.
npm install
npm run build
The dintero-checkout-web-sdk is built with microbundle.
package.json
.shasum -b -a 384 dist/checkout-web-sdk.umd.js | awk '{ print $1 }' | xxd -r -p | base64 | sed "s/^/sha384-/g"
npm publish --access=public
.FAQs
Dintero Checkout SDK for web frontends
The npm package @dintero/checkout-web-sdk receives a total of 97 weekly downloads. As such, @dintero/checkout-web-sdk popularity was classified as not popular.
We found that @dintero/checkout-web-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.