some cleanup and translation

This commit is contained in:
swtmply
2023-03-14 02:37:04 +08:00
parent 885e9c6958
commit 0617d79d19
3 changed files with 2879 additions and 2902 deletions

View File

@@ -1,29 +0,0 @@
import { gql } from "@apollo/client";
export const QUERY_ALL_PAYMENT_RESPONSE = gql`
query QUERY_ALL_PAYMENT_RESPONSE {
payment_response {
amount
bodyshopid
declinereason
ext_paymentid
id
jobid
paymentid
response
successful
}
}
`;
export const INSERT_PAYMENT_RESPONSE = gql`
mutation INSERT_PAYMENT_RESPONSE(
$paymentResponse: [payment_response_insert_input!]!
) {
insert_payment_response(objects: $paymentResponse) {
returning {
id
}
}
}
`;

File diff suppressed because it is too large Load Diff

View File

@@ -16,14 +16,18 @@ const url = process.env.NODE_ENV
: "https://test.cpteller.com/api/custapi.cfc?method=autoterminal";
exports.lightbox_credentials = async (req, res) => {
//req.user contains firebase decoded credentials
// can add bodyshopid to req.body
//Server side query to get API credentials for that shop and generatae link
try {
const options = {
method: "POST",
headers: { "content-type": "application/x-www-form-urlencoded" },
//TODO: Move these to environment variables/database.
data: qs.stringify({
merchantkey: "3B8068",
apikey: "Oepn2B.XqRgzAqHqvOOmYUxD2VW.vGSipi",
merchantkey: "3B8068", //This should be dynamic
apikey: "Oepn2B.XqRgzAqHqvOOmYUxD2VW.vGSipi", //This should be dynamic
operatingenv:
process.env.NODE_ENV === undefined
? process.env.NODE_ENV