# ap2ContentForCart

ap2ContentForCart in @provenanceauth/rails/ap2, Rails. Goal 7: AP2 checkout content for a store's cart, for an AP2 agent that arrived without a Checkout Mandate (or with one that doesn't cover this cart).

## Signature

```ts
ap2ContentForCart(order: { total: number; currency: string; merchant_id: string; origin?: string }, opts: { checkoutJwt?: string | null; merchantName?: string; intentToken?: string; jwksUrl?: string }): { content: Ap2CartContent; reason?: undefined } | { content: null; reason: "checkout_jwt_missing" | "checkout_jwt_malformed" }
```

## Parameters

- `order` ({ total: number; currency: string; merchant_id: string; origin?: string })
- `opts` ({ checkoutJwt?: string | null; merchantName?: string; intentToken?: string; jwksUrl?: string })

## Returns

`{ content: Ap2CartContent; reason?: undefined } | { content: null; reason: "checkout_jwt_missing" | "checkout_jwt_malformed" }`

Runs locally, with no request to the API.
