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

Add metadata field to payment intent #656

Merged
merged 2 commits into from
Apr 2, 2024
Merged

Conversation

nazli-stripe
Copy link
Collaborator

Summary

Adds metadata field when returning PI

Motivation

Add missing fields

Testing

  • I tested this manually
  • I added automated tests

Documentation

Select one:

  • I have added relevant documentation for my changes.
  • This PR does not result in any developer-facing changes.

bric-stripe
bric-stripe previously approved these changes Apr 2, 2024
Comment on lines 147 to 150
var metadataMap: NSDictionary?
if let refundMetadata = paymentIntent.metadata {
metadataMap = NSDictionary(dictionary: refundMetadata)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
var metadataMap: NSDictionary?
if let refundMetadata = paymentIntent.metadata {
metadataMap = NSDictionary(dictionary: refundMetadata)
}
var metadataMap: NSDictionary?
if let intentMetadata = paymentIntent.metadata {
metadataMap = NSDictionary(dictionary: intentMetadata)
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops fixed in 0af8410

@nazli-stripe nazli-stripe merged commit 57520ff into main Apr 2, 2024
2 checks passed
@nazli-stripe nazli-stripe deleted the nazli/pi-metadata branch September 7, 2024 17:14
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.

2 participants