From 7328d49d81f48c1803b02ca03a985c6020035201 Mon Sep 17 00:00:00 2001 From: Krystie Date: Mon, 25 May 2026 03:18:53 -0700 Subject: [PATCH] Fix: pass payment_method to generate_receipt (Stripe) The generate_receipt() function in fjccv_webhook.py now accepts and passes payment_method to generate_receipt.py. --- fjccv_webhook.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fjccv_webhook.py b/fjccv_webhook.py index df2fc17..2ecca3e 100644 --- a/fjccv_webhook.py +++ b/fjccv_webhook.py @@ -104,7 +104,8 @@ def get_donation_number(donor_name: str, year: int) -> str: return None def generate_receipt(donor: str, amount: float, date_str: str, - donation_number: str, transaction_id: str = None) -> Path: + donation_number: str, transaction_id: str = None, + payment_method: str = None) -> Path: """Generate the PDF receipt using the existing script.""" # Scripts are in the parent skill directory script_dir = Path('/root/.openclaw/agents/main/workspace/skills/fjccv-donation-receipts/scripts') @@ -123,6 +124,9 @@ def generate_receipt(donor: str, amount: float, date_str: str, if transaction_id: cmd.extend(['--transaction', transaction_id]) + if payment_method: + cmd.extend(['--payment-method', payment_method]) + try: result = subprocess.run(cmd, capture_output=True, text=True, check=True) for line in result.stdout.split('\n'): @@ -347,7 +351,8 @@ def _process_checkout_session(session, donor_name, donor_email, amount, transact amount=amount, date_str=date_str, donation_number=donation_number, - transaction_id=transaction_id + transaction_id=transaction_id, + payment_method="Stripe" ) if not receipt_pdf: