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

Enable trial period billing using trialDays parameter in EnsureBilling class #240

Closed
1 of 6 tasks
visionlabit opened this issue Jan 10, 2023 · 5 comments · May be fixed by Shopify/shopify-app-template-php#412
Closed
1 of 6 tasks
Labels

Comments

@visionlabit
Copy link

Overview

The Shopify PHP app template already supports, using the EnsureBilling class, the management of some Billing APIs mutations.
Since the underlying billing mutations already support the usage of "trialDays" parameter to enable a trial period of the app (https://shopify.dev/apps/billing/purchase-adjustments/free-trials), I would like to be able to define its value in the shopify.php config file and use it through the EnsureBilling functions as we can do for all the other billing parameters.

Type

  • New feature
  • Changes to existing features

Motivation

The EnsureBilling class enables setting up easily the Shopify app billing using middleware.
Since the billing API mutations used by EnsureBilling's functions already support for the trial period using the "trialDays" parameter, it would be convenient to be able to use all the mutations' native options also through EnsureBilling's functions which wrap them.

...

Area

  • Billing

Checklist

  • Add "trialDays" parameter to shopify.php config file example
  • Edit requestRecurringPayment and requestOneTimePayment functions to use and support the new trialDays parameter
  • Edit RECURRING_PURCHASE_MUTATION and ONE_TIME_PURCHASE_MUTATION to support the new trialDays parameter
@rafaelstz
Copy link

@visionlabit It's done here Shopify/shopify-app-template-php#412

@visionlabit
Copy link
Author

visionlabit commented Jan 12, 2023

@rafaelstz you are super!

Sorry but the value of trialDays parameter shouldn't be taken from the config file (shopify.php) as for the other parameters (such as amount, currency, etc) instead of being used as a costant?

@rafaelstz
Copy link

I agree, let's see what they think about it. I just moved it to the config.

@github-actions
Copy link

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

@github-actions github-actions bot added the Stale label Mar 14, 2023
@github-actions
Copy link

We are closing this issue because it has been inactive for a few months.
This probably means that it is not reproducible or it has been fixed in a newer version.
If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.

If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the CONTRIBUTING.md file for guidelines

Thank you!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants