- Add SubmittedOn = COALESCE(SubmittedOn, NOW()) to webhook for KDS timer - Add test mode webhook secret for dev.payfrit.com - Keep live mode webhook secret for biz.payfrit.com Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
48 lines
1.7 KiB
Text
48 lines
1.7 KiB
Text
<cfscript>
|
|
/**
|
|
* Stripe Configuration
|
|
*
|
|
* This file contains Stripe API keys and settings.
|
|
* DO NOT commit this file to version control with live keys!
|
|
*
|
|
* To switch between test/live:
|
|
* - Set stripeMode = "test" or "live"
|
|
* - Keys will be selected automatically
|
|
*/
|
|
|
|
// Mode: "test" or "live"
|
|
stripeMode = "test";
|
|
|
|
// Test keys (safe to commit)
|
|
stripeTestSecretKey = "sk_test_LfbmDduJxTwbVZmvcByYmirw";
|
|
stripeTestPublishableKey = "pk_test_sPBNzSyJ9HcEPJGC7dSo8NqN";
|
|
|
|
// Live keys (DO NOT commit real values)
|
|
stripeLiveSecretKey = "sk_live_REPLACE_ME";
|
|
stripeLivePublishableKey = "pk_live_REPLACE_ME";
|
|
|
|
// Webhook secrets
|
|
stripeTestWebhookSecret = "whsec_TJlxt9GPoUWeObmiWbjy8X5fChjQbJHp"; // dev.payfrit.com (test mode)
|
|
stripeLiveWebhookSecret = "whsec_8t6s9Lz0S5M1SYcEYvZ73qFP4zmtlG6h"; // biz.payfrit.com
|
|
|
|
// Select active keys based on mode
|
|
if (stripeMode == "test") {
|
|
application.stripeSecretKey = stripeTestSecretKey;
|
|
application.stripePublishableKey = stripeTestPublishableKey;
|
|
application.stripeWebhookSecret = stripeTestWebhookSecret;
|
|
} else {
|
|
application.stripeSecretKey = stripeLiveSecretKey;
|
|
application.stripePublishableKey = stripeLivePublishableKey;
|
|
application.stripeWebhookSecret = stripeLiveWebhookSecret;
|
|
}
|
|
|
|
// Fee Configuration
|
|
application.payfritCustomerFeePercent = 0.05; // 5% customer pays to Payfrit
|
|
application.payfritBusinessFeePercent = 0.05; // 5% business pays to Payfrit
|
|
application.cardFeePercent = 0.029; // 2.9% Stripe fee
|
|
application.cardFeeFixed = 0.30; // $0.30 Stripe fixed fee
|
|
|
|
// Activation (Cost Recovery) Configuration
|
|
application.activationCapCentsDefault = 2500; // $25.00
|
|
application.activationWithholdIncrementCents = 100; // $1.00 per payout
|
|
</cfscript>
|