![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.
bc-clearpay-sdk
Advanced tools
BetterCommerce's ClearPay NodeJS SDK enables BC client applications to integrate with ClearPay merchant API system. It publishes an interface to interact with [ClearPay API v2](https://developers.clearpay.co.uk/clearpay-online/reference) endpoints.
BetterCommerce's ClearPay NodeJS SDK enables BC client applications to integrate with ClearPay merchant API system. It publishes an interface to interact with ClearPay API v2 endpoints.
Use below command for package installation:
npm install @better-commerce/bc-clearpay-sdk
Use following snippet to initialize the SDK:
ClearPayEnvironment.init("<api_userId>", "<api_password>");
const data = {
purchaseCountry: "GB",
description: "Order c519a711-a406-ee11-b1c2-000d3a211cf7 for basket 42695bdd-5188-4e6b-8595-8d373a91d6fe OrderPaymentId 318096-1110599",
amount: {
amount: 79.99,
currency: "GBP"
},
taxAmount: {
amount: 13.33,
currency: "GBP"
},
shippingAmount: {
amount: 0,
currency: "GBP"
},
items: [
{
name: "BS21316-MAGENTA / FUCHSIA-16(1)",
sku: "BS21316-MAGENTA / FUCHSIA-16",
quantity: 1,
price: {
amount: 79.99,
currency: "GBP"
},
imageUrl: "http://localhost:3000/product/products/my-brand-pink-jacquard-tie-waist-midi-dress-bs21316-magenta-fuchsia-16",
pageUrl: "http://localhost:3000/product/products/my-brand-pink-jacquard-tie-waist-midi-dress-bs21316-magenta-fuchsia-16",
}
],
consumer: {
givenNames: "Test",
surname: "User",
email: "guest142@gmail.com",
phoneNumber: "012485744451"
},
billing: {
area1: "Edinburgh",
area2: "",
countryCode: "GB",
line1: "20/13 St. Peters Place",
line2: "address 2",
name: "Test User",
phoneNumber: "012485744451",
postcode: "EH3 9PQ"
},
shipping: {
area1: "Edinburgh",
area2: "",
countryCode: "GB",
line1: "20/13 St. Peters Place",
line2: "address 2",
name: "Test User",
phoneNumber: "012485744451",
postcode: "EH3 9PQ"
},
merchant: {
redirectConfirmUrl: "http://localhost:3000//payment-notification/clearpay",
redirectCancelUrl: "http://localhost:3000//payment-notification/clearpay/canceled",
popupOriginUrl: "http://localhost:3000/checkout",
}
};
const result = await new Payment().initIntent(data);
{
"token":"003.l8k5frtvq1nqi231ktol2n177rgheed3j34lgb3sui7cjpnj",
"expires":"2023-06-09T07:24:39.721Z",
"redirectCheckoutUrl":"https://portal.sandbox.clearpay.co.uk/uk/checkout/?token=003.l8k5frtvq1nqi231ktol2n177rgheed3j34lgb3sui7cjpnj"
}
const data = {
token: "003.b63tm5vhpf3lofthu48g4nemnb1pl5isi5atipqktqnl54f1",
};
const result = await new Payment().requestPayment(data);
{
"id":"400248040765",
"token":"003.b63tm5vhpf3lofthu48g4nemnb1pl5isi5atipqktqnl54f1",
"status":"APPROVED",
"created":"2023-06-09T09:07:23.276Z",
"originalAmount":{
"amount":"79.99",
"currency":"GBP"
},
"openToCaptureAmount":{
"amount":"0.00",
"currency":"GBP"
},
"paymentState":"CAPTURED",
"refunds":[
],
"orderDetails":{
"consumer":{
"phoneNumber":"012485744451",
"givenNames":"Test",
"surname":"User",
"email":"guest142@gmail.com"
},
"billing":{
"name":"Test User",
"line1":"20/13 St. Peters Place",
"line2":"address 2",
"area1":"Edinburgh",
"postcode":"EH39PQ",
"countryCode":"GB",
"phoneNumber":"012485744451"
},
"shipping":{
"name":"Test User",
"line1":"20/13 St. Peters Place",
"line2":"address 2",
"area1":"Edinburgh",
"postcode":"EH39PQ",
"countryCode":"GB",
"phoneNumber":"012485744451"
},
"courier":{
},
"items":[
{
"name":"BS21316-MAGENTA / FUCHSIA-16(1)",
"sku":"BS21316-MAGENTA / FUCHSIA-16",
"quantity":1,
"price":{
"amount":"79.99",
"currency":"GBP"
},
"pageUrl":"http://localhost:3000/product/products/my-brand-pink-jacquard-tie-waist-midi-dress-bs21316-magenta-fuchsia-16",
"imageUrl":"http://localhost:3000/product/products/my-brand-pink-jacquard-tie-waist-midi-dress-bs21316-magenta-fuchsia-16"
}
],
"discounts":[
],
"shippingAmount":{
"amount":"0.00",
"currency":"GBP"
},
"taxAmount":{
"amount":"13.33",
"currency":"GBP"
}
},
"events":[
{
"id":"2Qxl2GquYAK4kIJXOx55Z1WX4Hi",
"created":"2023-06-09T09:28:24.850Z",
"expires":null,
"type":"CAPTURED",
"amount":{
"amount":"79.99",
"currency":"GBP"
},
"paymentEventMerchantReference":null
}
]
}
const orderId = "400248040765";
const result = await new Payment().getDetails(orderId);
{
"id":"400248040765",
"token":"003.b63tm5vhpf3lofthu48g4nemnb1pl5isi5atipqktqnl54f1",
"status":"APPROVED",
"created":"2023-06-09T09:07:23.276Z",
"originalAmount":{
"amount":"79.99",
"currency":"GBP"
},
"openToCaptureAmount":{
"amount":"0.00",
"currency":"GBP"
},
"paymentState":"CAPTURED",
"refunds":[
],
"orderDetails":{
"consumer":{
"phoneNumber":"012485744451",
"givenNames":"Test",
"surname":"User",
"email":"guest142@gmail.com"
},
"billing":{
"name":"Test User",
"line1":"20/13 St. Peters Place",
"line2":"address 2",
"area1":"Edinburgh",
"area2":"",
"postcode":"EH3 9PQ",
"countryCode":"GB",
"phoneNumber":"012485744451"
},
"shipping":{
"name":"Test User",
"line1":"20/13 St. Peters Place",
"line2":"address 2",
"area1":"Edinburgh",
"area2":"",
"postcode":"EH3 9PQ",
"countryCode":"GB",
"phoneNumber":"012485744451"
},
"courier":{
},
"items":[
{
"name":"BS21316-MAGENTA / FUCHSIA-16(1)",
"sku":"BS21316-MAGENTA / FUCHSIA-16",
"quantity":1,
"price":{
"amount":"79.99",
"currency":"GBP"
},
"pageUrl":"http://localhost:3000/product/products/my-brand-pink-jacquard-tie-waist-midi-dress-bs21316-magenta-fuchsia-16",
"imageUrl":"http://localhost:3000/product/products/my-brand-pink-jacquard-tie-waist-midi-dress-bs21316-magenta-fuchsia-16",
"categories":[
]
}
],
"discounts":[
],
"shippingAmount":{
"amount":"0.00",
"currency":"GBP"
},
"taxAmount":{
"amount":"13.33",
"currency":"GBP"
}
},
"events":[
{
"id":"2Qxl2GquYAK4kIJXOx55Z1WX4Hi",
"created":"2023-06-09T09:28:24.880Z",
"expires":null,
"type":"CAPTURED",
"amount":{
"amount":"79.99",
"currency":"GBP"
},
"paymentEventMerchantReference":null
}
]
}
FAQs
BetterCommerce's ClearPay NodeJS SDK enables BC client applications to integrate with ClearPay merchant API system. It publishes an interface to interact with [ClearPay API v2](https://developers.clearpay.co.uk/clearpay-online/reference) endpoints.
We found that bc-clearpay-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
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.