Skip to content

v13.7.0

Choose a tag to compare

@github-actions github-actions released this 03 Dec 22:10
· 12 commits to main since this release
  • Fix Pay::Env and Pay::Stripe.webhook_receive_test_events so boolean false in Rails credentials is preserved instead of evaluating to true
  • Pay::Stripe::Charge#stripe_object now constructs objects via Pay::Stripe.construct_from, preserving client_options API keys and Connect stripe_account when paging sub-resources
  • Pay::Stripe::Subscription#swap and Pay::Stripe::Customer#subscribe now merge caller-supplied :expand options with Pay's required expands instead of overwriting them, and swap syncs the local subscription before raising Pay::ActionRequired
  • Pay::Stripe::Subscription.sync now sets pause_starts_at on the initial sync of a subscription already paused with void, and Subscription#resume clears cancel_at_period_end as well when resuming a subscription that is both void-paused and scheduled to cancel
  • Avoid a duplicate Stripe customer lookup when customer.updated webhooks sync the default payment method
  • Guard Pay::Receipts#pdf_line_items against nil line pricing and unmatched discounts on Stripe invoices
  • Fix the SCA payment confirmation page to handle requires_action intents with stripe.handleNextAction({clientSecret}) instead of calling confirmPayment/confirmSetup without Elements, remove the unused cardholder name input left over from Card Element, and pin the CDN Tailwind and Stimulus assets with Subresource Integrity hashes
  • Pay::Stripe::Customer#api_record no longer acquires a database row lock or reloads the record when processor_id is already set, avoiding holding DB locks across Stripe HTTP calls on reads
  • Pay::Stripe.sync_checkout_session now retries InvalidRequestError raised inside Subscription.sync and Charge.sync (which wrap Stripe errors in Pay::Stripe::Error) and fixes the off-by-one retry count
  • Pay::Stripe.sync_checkout_session wraps other Stripe::StripeError exceptions in Pay::Stripe::Error
  • Pay::Stripe.sync_checkout_session now supports setup mode sessions and accepts customer: for Pay::Stripe.client_options
  • Deprecate Pay::Subscription#swap_and_invoice in favor of swap (which already invoices prorations on Stripe via proration_behavior: "always_invoice") and stop creating a redundant empty manual invoice
  • Pay::Stripe::Customer#sync_subscriptions now returns [] when processor_id is blank (instead of listing all subscriptions on the Stripe account) and paginates through all pages with auto_paging_each
  • Stripe checkout.session.completed webhooks no longer overwrite an existing Stripe customer's processor_id when a client_reference_id points to an owner that already has a different Stripe customer
  • Fix duplicate pay.line_items.total locale key so Stripe PDF receipts label the pre-tax total with pay.line_items.total_excluding_tax. If you maintain custom locale files, add pay.line_items.total_excluding_tax
  • Pay::Stripe::Subscription#pay_open_invoices (used by retry_past_due_subscriptions! and customer.updated webhooks) now pays open invoices via invoices.pay(off_session: true) instead of confirming PaymentIntents directly, so Stripe handles payment method selection and emits invoice.payment_action_required when 3DS is needed
  • Pay::Stripe::Charge#refund! now reads amount_refunded from the expanded charge returned by Stripe instead of incrementing the in-memory value (avoiding double-counting when racing charge.refunded webhooks) and preserves caller-supplied lines: on credit notes