feat: add email-only wallet checkout
All checks were successful
CI and Production Smoke / smoke (push) Successful in 12s
All checks were successful
CI and Production Smoke / smoke (push) Successful in 12s
This commit is contained in:
@@ -80,12 +80,17 @@ export async function createDemandProposal(formData: FormData) {
|
||||
const source = getString(formData, "source") || "vibework-propose";
|
||||
const campaign = getString(formData, "campaign") || "direct";
|
||||
const paymentMethod = getString(formData, "paymentMethod") || "stripe";
|
||||
const quickMode = getString(formData, "quickMode") === "paid_scout";
|
||||
|
||||
const proposerName = getString(formData, "proposerName");
|
||||
const proposerEmail = getString(formData, "proposerEmail");
|
||||
const company = getString(formData, "company");
|
||||
const title = getString(formData, "title");
|
||||
const description = getString(formData, "description");
|
||||
const title = getString(formData, "title") || (quickMode ? "Paid scout intake request" : "");
|
||||
const description =
|
||||
getString(formData, "description") ||
|
||||
(quickMode
|
||||
? "Email-only paid scout intake. Scope details are pending follow-up after USDC payment instructions are issued."
|
||||
: "");
|
||||
const desiredOutcome = getString(formData, "desiredOutcome");
|
||||
const urgency = getString(formData, "urgency") || "normal";
|
||||
const requiredStack = parseStack(getString(formData, "requiredStack"));
|
||||
@@ -180,6 +185,7 @@ export async function createDemandProposal(formData: FormData) {
|
||||
campaign,
|
||||
referral_agent: referralAgent || null,
|
||||
payment_method: paymentMethod,
|
||||
quick_mode: quickMode,
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -201,6 +207,7 @@ export async function createDemandProposal(formData: FormData) {
|
||||
campaign,
|
||||
referral_agent: referralAgent,
|
||||
payment_method: paymentMethod,
|
||||
quick_mode: quickMode,
|
||||
response_status: 200,
|
||||
response_summary: "demand_proposal_intake_created",
|
||||
},
|
||||
@@ -223,6 +230,7 @@ export async function createDemandProposal(formData: FormData) {
|
||||
treasury_usdc_network: TREASURY_USDC_NETWORK,
|
||||
treasury_usdc_chain_id: TREASURY_USDC_CHAIN_ID,
|
||||
treasury_usdc_token_address: TREASURY_USDC_TOKEN_ADDRESS,
|
||||
quick_mode: quickMode,
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -242,6 +250,7 @@ export async function createDemandProposal(formData: FormData) {
|
||||
referral_agent: referralAgent,
|
||||
treasury_usdc_network: TREASURY_USDC_NETWORK,
|
||||
treasury_usdc_chain_id: TREASURY_USDC_CHAIN_ID,
|
||||
quick_mode: quickMode,
|
||||
response_status: 200,
|
||||
response_summary: "wallet_payment_instructions_issued",
|
||||
},
|
||||
|
||||
@@ -55,6 +55,7 @@ export default async function ProposePage({ searchParams }: { searchParams?: Sea
|
||||
const campaign = getParam(params, "campaign") || "vibework-propose";
|
||||
const source = getParam(params, "source") || (referralAgent ? "external-agent" : "direct");
|
||||
const packageId = getProposalPackage(getParam(params, "package")).id;
|
||||
const quickPackage = getProposalPackage("scout");
|
||||
const cancelled = getParam(params, "cancelled") === "true";
|
||||
const budgetPrefillValue = getFirstParam(params, ["budget_usd", "budget"]);
|
||||
const urgencyPrefillValue = getParam(params, "urgency");
|
||||
@@ -168,6 +169,47 @@ export default async function ProposePage({ searchParams }: { searchParams?: Sea
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<form action={createDemandProposal} className="mb-5 rounded-lg border border-emerald-400/30 bg-emerald-400/10 p-5 shadow-2xl shadow-black/30 md:p-6">
|
||||
<input type="hidden" name="refAgent" value={referralAgent} />
|
||||
<input type="hidden" name="campaign" value={campaign} />
|
||||
<input type="hidden" name="source" value={source} />
|
||||
<input type="hidden" name="quickMode" value="paid_scout" />
|
||||
<input type="hidden" name="packageId" value={quickPackage.id} />
|
||||
<input type="hidden" name="paymentMethod" value="wallet" />
|
||||
<input type="hidden" name="budgetUsd" value={prefill.budgetUsd} />
|
||||
<input type="hidden" name="title" value="Paid scout intake request" />
|
||||
<input
|
||||
type="hidden"
|
||||
name="description"
|
||||
value="Email-only paid scout intake. Scope details are pending follow-up after USDC payment instructions are issued."
|
||||
/>
|
||||
|
||||
<div className="flex flex-col gap-4 md:flex-row md:items-end">
|
||||
<div className="flex-1">
|
||||
<p className="text-sm font-semibold text-emerald-50">快速取得 {quickPackage.label} USDC 付款指示</p>
|
||||
<label className="mt-3 grid gap-2 text-sm font-medium text-emerald-50">
|
||||
Email
|
||||
<input
|
||||
required
|
||||
name="proposerEmail"
|
||||
type="email"
|
||||
autoComplete="email"
|
||||
defaultValue={prefill.proposerEmail}
|
||||
className="h-11 rounded-md border border-emerald-300/30 bg-zinc-950 px-3 text-white outline-none focus:border-emerald-300"
|
||||
placeholder="name@company.com"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
<button
|
||||
type="submit"
|
||||
className="inline-flex h-11 items-center justify-center gap-2 rounded-md bg-emerald-300 px-5 text-sm font-semibold text-zinc-950 transition hover:bg-emerald-200"
|
||||
>
|
||||
直接進入錢包付款
|
||||
<ArrowRight className="h-4 w-4" />
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form action={createDemandProposal} className="rounded-lg border border-zinc-800 bg-zinc-900/80 p-5 shadow-2xl shadow-black/30 md:p-6">
|
||||
<input type="hidden" name="refAgent" value={referralAgent} />
|
||||
<input type="hidden" name="campaign" value={campaign} />
|
||||
|
||||
Reference in New Issue
Block a user