Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PaymentIntent+API.swift #3650

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

dasportillo
Copy link

Fix: PaymentIntent Confirmation with Client Secret

Summary

This change addresses an issue with completing the payment intent in Stripe. The modification ensures that the client_secret is handled correctly during the transaction confirmation at the /paymentintent/{id}/confirm endpoint.

Motivation

This change fixes a bug where the Stripe API did not accept the client_secret in the same request during the transaction confirmation. Without this fix, the payment intent could not be completed successfully.

Example code demonstrating the issue:

# Example code showing the issue
response = stripe.PaymentIntent.confirm(
  "pi_123456789",
  {
    "client_secret": "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
  }
)

I made this change because, without it, it is not possible to complete the payment intent in Stripe. The issue occurred during the transaction at the endpoint /paymentintent/{id}/confirm, as the Stripe API did not accept the client_secret in the same request. With this modification, the library now functions correctly, allowing for the successful confirmation of the payment intent.
@dasportillo dasportillo requested review from a team as code owners June 10, 2024 14:00
@CLAassistant
Copy link

CLAassistant commented Jun 10, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants