Unable to update PaymentIntent.customer
ryenski opened this issue · comments
Ryan Heneise commented
Updating the customer
attribute of a PaymentIntent does not save the customer. This works in the live API, but not in the mock.
cus = Stripe::Customer.create({email: 'test1@example.com'})
pi = Stripe::PaymentIntent.create(amount: 3000, currency: 'usd')
Stripe::PaymentIntent.update(pi.id, {customer: cus.id})
pi.customer
=> nil
Stripe::PaymentIntent.retrieve(pi.id).customer
=> nil
Updating other attributes works as expected:
pi = Stripe::PaymentIntent.create(amount: 3000, currency: 'usd')
Stripe::PaymentIntent.update(pi.id, { metadata: { order_id: 'ord_1234' } })
Stripe::PaymentIntent.retrieve(pi.id).metadata
=>
#<Stripe::StripeObject:0x148b74> JSON: {
"order_id": "ord_1234"
}
Ryan Heneise commented
Possibly related to #856?