some cleanup and translation
This commit is contained in:
@@ -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
@@ -16,14 +16,18 @@ const url = process.env.NODE_ENV
|
|||||||
: "https://test.cpteller.com/api/custapi.cfc?method=autoterminal";
|
: "https://test.cpteller.com/api/custapi.cfc?method=autoterminal";
|
||||||
|
|
||||||
exports.lightbox_credentials = async (req, res) => {
|
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 {
|
try {
|
||||||
const options = {
|
const options = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "content-type": "application/x-www-form-urlencoded" },
|
headers: { "content-type": "application/x-www-form-urlencoded" },
|
||||||
//TODO: Move these to environment variables/database.
|
//TODO: Move these to environment variables/database.
|
||||||
data: qs.stringify({
|
data: qs.stringify({
|
||||||
merchantkey: "3B8068",
|
merchantkey: "3B8068", //This should be dynamic
|
||||||
apikey: "Oepn2B.XqRgzAqHqvOOmYUxD2VW.vGSipi",
|
apikey: "Oepn2B.XqRgzAqHqvOOmYUxD2VW.vGSipi", //This should be dynamic
|
||||||
operatingenv:
|
operatingenv:
|
||||||
process.env.NODE_ENV === undefined
|
process.env.NODE_ENV === undefined
|
||||||
? process.env.NODE_ENV
|
? process.env.NODE_ENV
|
||||||
|
|||||||
Reference in New Issue
Block a user