with GoCanvas and Verifone?
Emit new event when a new submission is uploaded to GoCanvas.
Creates or updates GoCanvas reference data. See the documentation
Removes a specific dispatch from GoCanvas. See the documentation
The GoCanvas API allows for the automation of document processing tasks, enabling data extraction from PDFs with ease, thus facilitating the seamless transfer of this data to other systems or databases. This proves particularly useful for businesses aiming to digitize paper-based processes, automate data entry, or integrate with other digital tools to enhance productivity and reduce manual errors.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
gocanvas: {
type: "app",
app: "gocanvas",
}
},
async run({steps, $}) {
const data = {
"username": `${this.gocanvas.$auth.username}`,
}
return await axios($, {
url: `https://www.gocanvas.com/apiv2/forms.xml`,
headers: {
Authorization: `Bearer ${this.gocanvas.$auth.api_key}`,
},
data,
})
},
})
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"
},
})
},
})