with BlueSnap and Click & Sign?
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
bluesnap: {
type: "app",
app: "bluesnap",
}
},
async run({steps, $}) {
const data = { //Sample payload
"amount": 3500.00,
"currency": "USD",
"cardTransactionType": "AUTH_CAPTURE",
"cardHolderInfo": {
"firstName": "Test",
"lastName": "User",
"zip": "12345"
},
"creditCard": {
"expirationYear": 2025,
"expirationMonth": "12",
"cardNumber": "4111111111111111",
"securityCode": "123"
}
}
return await axios($, {
method: "post",
url: `${this.bluesnap.$auth.api_url}/services/2/transactions`,
headers: {
"content-type": `application/json`,
"bluesnap-version": `3.0`,
"accept": `application/json`,
},
auth: {
username: `${this.bluesnap.$auth.username}`,
password: `${this.bluesnap.$auth.password}`,
},
data,
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
click_sign: {
type: "app",
app: "click_sign",
}
},
async run({steps, $}) {
const data = {
"request": `GET_CONFIG_LIST`,
"user": `${this.click_sign.$auth.username}`,
}
return await axios($, {
method: "post",
url: `https://api.lleida.net/cs/v1/get_config_list`,
headers: {
"authorization": `x-api-key ${this.click_sign.$auth.api_key}`,
},
data,
})
},
})