@dineway-ai/plugin-payment 0.2.10 → 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dineway-ai/plugin-payment",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Provider-neutral payment infrastructure and Stripe integration for Dineway plugins",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -333,8 +333,9 @@ export async function resumePurchase(
333
333
  cancel_url: returnUrl.href,
334
334
  locale: purchaseInput(contract).locale,
335
335
  expires_at: purchase.expiresAt,
336
- allow_promotion_codes: false,
337
- ...(contract.couponId ? { discounts: [{ coupon: contract.couponId }] } : {}),
336
+ ...(contract.couponId
337
+ ? { discounts: [{ coupon: contract.couponId }] }
338
+ : { allow_promotion_codes: false }),
338
339
  },
339
340
  { idempotencyKey: idempotency(context, "checkout", purchase.reference) },
340
341
  );