Skip to content

Conversation

@lbuguellou
Copy link

Create Stripe InvoiceItem accept price identifier in "price" attributes but with the converter on price and amount, this identifier is transformed to integer and not correspond to a StripePriceId

I propose to use a boolean attribute "conversion" to bypass this conversion if needed like :

Stripe::invoiceItems()->create('cus_ndfjshjfdhf45456', [ 'price' => 'price_hjhghdqezei1545', 'conversion' => false, ]);

When using price identifier in attribute "price", bypass conversion
@brunogaspar
Copy link
Member

Not really a fan of passing such parameters around, seems that just checking if the value of amount is numeric would be a tad better i think.

In any case, it would need tests.

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