redwoodjs-stripe icon indicating copy to clipboard operation
redwoodjs-stripe copied to clipboard

Improvement: allow any parameters for checkout()

Open chrisvdm opened this issue 6 months ago • 0 comments

  • Create object for checkout mutation (StripeCheckoutParamsInput) in schema
 gql`
      mutation Checkout(
        $params: StripeCheckoutParamsInput
      ) {
        checkout(params: $params) {
          id
          url
        }
      }
    `
  • use ...restParams in hooks and services
async ({ cart, customer, successUrl, cancelUrl, mode, allowPromotionCodes, ...restParams }) => {
...
}

chrisvdm avatar Jan 12 '24 17:01 chrisvdm