Closed Dreaming-Codes closed 9 months ago
Stripe returns an array of strings starting with "atxi", but this library expects "txi" instead.
latest_invoice.payment_intent
It doesn't produce an error.
let mut subscription_args = CreateSubscription::new(stripe_id); subscription_args.items = Some(vec![CreateSubscriptionItems { price: Some('your price id'), ..Default::default() }]); subscription_args.payment_behavior= Some(SubscriptionPaymentBehavior::DefaultIncomplete); subscription_args.payment_settings = Some(CreateSubscriptionPaymentSettings { save_default_payment_method: Some(CreateSubscriptionPaymentSettingsSaveDefaultPaymentMethod::OnSubscription), ..Default::default() }); subscription_args.automatic_tax = Some(CreateSubscriptionAutomaticTax { enabled: false, }); subscription_args.expand = &["latest_invoice.payment_intent"]; let subscription = Subscription::create(&stripe, subscription_args).await.unwrap(); let latest_invoice = subscription.latest_invoice.unwrap().into_object().unwrap(); let payment_intent = latest_invoice.payment_intent.unwrap().into_object().unwrap();
linux
1.73.0
0.25.2
2023-10-16
No response
Describe the bug
Stripe returns an array of strings starting with "atxi", but this library expects "txi" instead.
To Reproduce
latest_invoice.payment_intent
in the expand field.Expected behavior
It doesn't produce an error.
Code snippets
OS
linux
Rust version
1.73.0
Library version
0.25.2
API version
2023-10-16
Additional context
No response