mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-08-13 14:37:26 +00:00
Use configured CoinPay USDC chain
This commit is contained in:
parent
a0314eb774
commit
1a87c2f26d
3 changed files with 3 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ LOGICSRC_SCHEMA_VERSION=0.1
|
|||
COINPAY_API_URL=
|
||||
COINPAY_API_KEY=
|
||||
COINPAY_MERCHANT_ID=
|
||||
COINPAY_HIRE_US_BLOCKCHAIN=USDC_BASE
|
||||
COINPAY_HIRE_US_BLOCKCHAIN=USDC_POL
|
||||
COINPAY_WEBHOOK_SECRET=
|
||||
|
||||
UGIG_API_URL=
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ async function handleHireUsCoinPayCheckout(request, response) {
|
|||
const apiKey = process.env.COINPAY_API_KEY;
|
||||
const merchantId = process.env.COINPAY_MERCHANT_ID;
|
||||
const apiUrl = process.env.COINPAY_API_URL || "https://coinpayportal.com";
|
||||
const blockchain = process.env.COINPAY_HIRE_US_BLOCKCHAIN || "USDC_BASE";
|
||||
const blockchain = process.env.COINPAY_HIRE_US_BLOCKCHAIN || "USDC_POL";
|
||||
|
||||
if (!apiKey) {
|
||||
sendJson(response, 503, { success: false, error: "CoinPay checkout is not configured" });
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ function buildCoinPayResult(payment: {
|
|||
|
||||
const details = document.createElement("dl");
|
||||
details.append(
|
||||
buildDetail("Amount", `$${payment.amount_usd ?? 500} / ${payment.crypto_amount ?? "quoted at checkout"} ${payment.currency ?? "USDC_BASE"}`),
|
||||
buildDetail("Amount", `$${payment.amount_usd ?? 500} / ${payment.crypto_amount ?? "quoted at checkout"} ${payment.currency ?? "USDC_POL"}`),
|
||||
buildDetail("Address", payment.address ?? "Open CoinPay to complete payment", true),
|
||||
buildDetail("Payment ID", payment.id ?? "pending", true)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue