with Launch27 and Verifone?
Launch27 is a robust platform aimed at helping businesses manage bookings and appointments seamlessly. Leveraging the Launch27 API on Pipedream, users can automate various business processes by connecting their scheduling system with other apps and services. This can include automations like syncing new bookings with a Google Calendar, triggering SMS or email reminders when an appointment is nearing, or compiling customer feedback collected through Launch27 into a CRM platform.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
launch27: {
type: "app",
app: "launch27",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.launch27.$auth.domain}.launch27.com/v1/settings`,
headers: {
Authorization: `Bearer ${this.launch27.$auth.oauth_access_token}`,
"Content-Type": `application/json`,
},
})
},
})
import { axios } from "@pipedream/platform";
import dayjs from "dayjs";
import crypto from "crypto";
export default defineComponent({
props: {
verifone: {
type: "app",
app: "verifone",
}
},
async run({steps, $}) {
let requestDateTime = new Date();
requestDateTime = dayjs(requestDateTime).format("YYYY-MM-DD hh:mm:ss");
const algo = "sha256";
let hash = this.verifone.$auth.vendor_code.length
+ this.verifone.$auth.vendor_code
+ requestDateTime.toString().length
+ requestDateTime;
hash = crypto.createHmac(algo, this.verifone.$auth.secret_key)
.update(hash)
.digest('hex');
return await axios($, {
url: `https://api.2checkout.com/rest/6.0/products/`,
headers: {
"X-Avangate-Authentication": `code="${this.verifone.$auth.vendor_code}" date="${requestDateTime}" hash="${hash}" algo="${algo}"`,
Accept: "application/json"
},
})
},
})