![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@bitcoin-suisse/pay
Advanced tools
By implementing the @bitcoin-suisse/pay plugin and by having a Bitcoin Suisse merchant account, you will be able accept crypto currencies as online payment method for goods and services, alongside credit cards 💳 and other payment methods in your checkout process.
Run the following to install the package.
npm install @bitcoin-suisse/pay
Either add the script directly, preferably in <head>
tag.
<script type="text/javascript" src="~/node_modules/@bitcoin-suisse/pay/index.js"></script>
Or import the script into a larger codebase.
import { CryptoPayments } from '@bitcoin-suisse/pay';
The format of the auth-key consists the Terminal ID + secret (found on the Merchant site below Customer Details -> API -> SharedSecret
)
MacOS
Run shasum -a 256 /path/to/file
Windows
Run certutil -hashfile /path/to/file SHA256
Example:
TerminalID: 987654321
Secret: 000000001
Format: <terminalID><secret>
input.txt contains: 987654321000000001
shasum -a 256 input.txt
SHA256/auth-key: 360d768442b399b2de3dded67681b3cca5eecde955c44c0b5db63353ec267ae6
At the end of your <body>
tag, or directly from within a SPA, instantiate an instance of the CryptoPayments lib.
/*
Required:
terminalId: Terminal ID
auth: The auth-key enables the callback response as part of the paymentCallbackUrl if this is supplied
paymentId: Adding this instead of amount and fromCurrency directs to specific payments request
amount: Payment amount (not valid if paymentId is added)
fromCurrency: Currency (abbriviation e.g. EUR, USD, CHF) (not valid if paymentId is added)
-------------------------------------
Optional:
paymentCallbackUrl: Platform specific callback (avoid querstrings in URL)
language: en (default), de, fr, it
target: Append target to an HTML element (default: appended to body)
referenceId: Adds a reference note to the payment request
*/
new CryptoPayments({
terminalId: '123456789',
auth: '0000...',
paymentId: '0000000001',
amount: 1337,
fromCurrency: 'CHF',
paymentCallbackUrl: 'https://www.example.com',
language: 'en',
target: document.getElementById('terminal-container'),
referenceId: '12345-12345-12345',
})
.create()
.then((data) => {
console.log('data:', data);
// This is called when a payment has been successfully interacted with.
// The terminal view will remove itself.
// Payment states 👇
// "crypto-payments-status-PAID":
// "crypto-payments-status-PAIDOVER":
// "crypto-payments-status-PAIDLATE":
// "crypto-payments-status-PAIDPARTIAL":
// Up to the client if they want to redirect to a certain success URL or update SPA accordingly.
})
.catch((errorData) => {
console.log('data:', errorData);
// This is called when a payment has an error
// Terminal view will remove itself
// Payment states 👇
// "crypto-payments-status-CANCELED":
// "crypto-payments-status-EXPIRED":
// Up to the client if they want to redirect to a certain error URL or update SPA accordingly.
});
CallbackURL will get the following parameters appended (querystring)
?transactionid={payment.Key}
&orderid={payment.OrderNumberRef}
&state={state.Enumeration}
&amount={Convert.ToString(payment.Amount)}
¤cy={payment.FromCurrencyName}
&date={Date(yyyyMMdd) | ""}
&time={Date("hhmm") | ""}
&publickey={payment.CCAddress}
&paymentType={payment.ToCurrencyName}
&terminal={payment.TerminalKey}
&hash={Sha256}
FAQs
Bitcoin Suisse Pay plugin for crypto payments
The npm package @bitcoin-suisse/pay receives a total of 30 weekly downloads. As such, @bitcoin-suisse/pay popularity was classified as not popular.
We found that @bitcoin-suisse/pay demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.