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 Utility.php #213

Open
wants to merge 1 commit into
base: 2.4
Choose a base branch
from
Open

Update Utility.php #213

wants to merge 1 commit into from

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