Allow recurring date to be set
This is a feature request. What is the funding estimate needed to allow contributors to set the recurring data on the front-end when making a contribution? In our case, we want it to only allow the first of the month as an option.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
Hi @andyburns it looks like this would be quite simple to implement. We have example implementations from IATS and can use the
billing_cycle_anchor
parameter on the Stripe API which let's us specify a start date for a subscription.Estimate for this development is 4 hours. Please contact directly if you'd like to discuss/fund this.
- mattwire added Needs funding enhancement labels
added Needs funding enhancement labels
- mattwire added Funded label and removed Needs funding label
added Funded label and removed Needs funding label
This is now available for testing in 6.5 branch (https://lab.civicrm.org/extensions/stripe/-/tree/6.5). Note that you will need to update mjwshared as well to use the 0.9 branch (https://lab.civicrm.org/extensions/mjwshared/-/tree/0.9)
- mattwire added Waiting feedback label
added Waiting feedback label
- Author
Right now, monthly and annual recurrings are using the same recur date. In our case, only setting the monthly date is desirable.
I had a successful test on a regular contribution page.
Testing on a recurring membership contribution page where the monthly membership auto-renew options is set to required resulted in this error:
Stripe\Error\InvalidRequest: "Invalid timestamp: must be an integer Unix timestamp in the future." #0 .../wp-content/uploads/civicrm/ext/stripe-6.5/vendor/stripe/stripe-php/lib/ApiRequestor.php(173): Stripe\ApiRequestor::_specificAPIError("{\n \"error\": {\n \"message\": \"Invalid timestamp: must be an integer U...", 400, Object(Stripe\Util\CaseInsensitiveArray), (Array:1), (Array:3)) #1 .../wp-content/uploads/civicrm/ext/stripe-6.5/vendor/stripe/stripe-php/lib/ApiRequestor.php(473): Stripe\ApiRequestor->handleErrorResponse("{\n \"error\": {\n \"message\": \"Invalid timestamp: must be an integer U...", 400, Object(Stripe\Util\CaseInsensitiveArray), (Array:1)) #2 .../wp-content/uploads/civicrm/ext/stripe-6.5/vendor/stripe/stripe-php/lib/ApiRequestor.php(126): Stripe\ApiRequestor->_interpretResponse("{\n \"error\": {\n \"message\": \"Invalid timestamp: must be an integer U...", 400, Object(Stripe\Util\CaseInsensitiveArray)) #3 .../wp-content/uploads/civicrm/ext/stripe-6.5/vendor/stripe/stripe-php/lib/ApiOperations/Request.php(57): Stripe\ApiRequestor->request("post", "/v1/customers/cus_GYTF15JlEhBbnz/subscriptions", (Array:6), (Array:0)) #4 .../wp-content/uploads/civicrm/ext/stripe-6.5/vendor/stripe/stripe-php/lib/ApiOperations/Request.php(39): Stripe\Collection::_staticRequest("post", "/v1/customers/cus_GYTF15JlEhBbnz/subscriptions", (Array:6), Object(Stripe\Util\RequestOptions)) #5 .../wp-content/uploads/civicrm/ext/stripe-6.5/vendor/stripe/stripe-php/lib/Collection.php(49): Stripe\Collection->_request("post", "/v1/customers/cus_GYTF15JlEhBbnz/subscriptions", (Array:6), NULL) #6 .../wp-content/uploads/civicrm/ext/stripe-6.5/CRM/Core/Payment/Stripe.php(696): Stripe\Collection->create((Array:6)) #7 .../wp-content/uploads/civicrm/ext/stripe-6.5/CRM/Core/Payment/Stripe.php(577): CRM_Core_Payment_Stripe->doRecurPayment((Array:46), "500", Object(Stripe\Customer), Object(Stripe\PaymentMethod)) #8 .../wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(1624): CRM_Core_Payment_Stripe->doPayment((Array:46), "contribute") #9 .../wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(1375): CRM_Contribute_Form_Contribution_Confirm->postProcessMembership((Array:60), "20", Object(CRM_Contribute_Form_Contribution_Confirm), (Array:44), (Array:0), (Array:0), (Array:20), (Array:1), TRUE, NULL, FALSE, "2", (Array:1)) #10 .../wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(2438): CRM_Contribute_Form_Contribution_Confirm->processMembership((Array:49), "20", (Array:0), (Array:0), (Array:44), (Array:1)) #11 .../wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(2283): CRM_Contribute_Form_Contribution_Confirm->doMembershipProcessing("20", (Array:49), (Array:44), (Array:1)) #12 .../wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(688): CRM_Contribute_Form_Contribution_Confirm->processFormSubmission("20") #13 .../wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(484): CRM_Contribute_Form_Contribution_Confirm->postProcess() #14 .../wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(144): CRM_Core_Form->mainProcess() #15 .../wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(45): CRM_Core_StateMachine->perform(Object(CRM_Contribute_Form_Contribution_Confirm), "next", "Next") #16 .../wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Contribute_Form_Contribution_Confirm), "next") #17 .../wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution_Confirm), "next") #18 .../wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(335): HTML_QuickForm_Page->handle("next") #19 .../wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(312): CRM_Core_Controller->run((Array:3), NULL) #20 .../wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:15)) #21 .../wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3)) #22 .../wp-content/plugins/civicrm/civicrm.php(1535): CRM_Core_Invoke::invoke((Array:3)) #23 .../wp-content/plugins/civicrm/includes/civicrm.basepage.php(352): CiviCRM_For_WordPress->invoke() #24 .../wp-includes/class-wp-hook.php(287): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP)) #25 .../wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, (Array:1)) #26 .../wp-includes/plugin.php(544): WP_Hook->do_action((Array:1)) #27 .../wp-includes/class-wp.php(752): do_action_ref_array("wp", (Array:1)) #28 .../wp-includes/functions.php(1274): WP->main("") #29 .../wp-blog-header.php(16): wp() #30 .../index.php(17): require(".../wp-blog-header.php") #31 {main}
- Author
The membership test did not effect the start date. It appears the stripe settings are not being enforced on membership pages.
@andyburns Please update to latest 6.5 and 0.9 branches - memberships should now work as well.
- Author
I get the same error referenced here #199 (closed) (comment 40112).
This wasn't easy to track down. It relies on the submission taking more than one second and the receive_date being "now". But I have now reproduced and pushed a fix. Can you try the latest 6.5 branch and see if it works?
This is the specific commit that should fix the issue ffcbe024
- Author
My test appears to have worked in terms of setting the receive date to the date I choose (looking at Stripe and Civi). I set it to recur on the 11th so I will see if the rest of the process works (membership status and contribution pings back) as expected. Thank you!
- Author
The 6.5 branch no longer exists https://lab.civicrm.org/extensions/stripe/-/tree/6.5
What is the target date for official release of 6.5?
Edited by andyburns - AuthorEdited by andyburns
@andyburns Please try 6.5-beta2
@andyburns Closing - please re-open if still an issue.
- mattwire closed
closed
- Author
6.5-beta2 works
@andyburns Thanks for feeding back and confirming
- mattwire removed Waiting feedback label
removed Waiting feedback label