I would suggest not using a payment gateway at all. Instead create free plans to bypass gateways entirely. You can then use your points entirely through conditions and integrations.
So for example under the Workflows tab you'd configure conditions against your points field to ensure they can't update or subscribe to the plan if they don't have enough points. Example as follows.
Subscriptions upgrades workflows
Allow upgrade to this: Yes
Propose plan for upgrades only if it is more expensive: No: It will be possible to upgrade to this plan (for free with pro-rating) if all conditions below and elsewhere are met
First static condition: This condition must be NOT be met to allow upgrades:
Date A, Field A or Value A: Following CB field
CB Field A: SELECT_POINTS_FIELD_HERE
Date B, Field B or Value B: Constant Value or String (CB substitutions can be used)
Value B: POINTS_COST_HERE
Condition 1 (> for Dates): A < B (Value A is smaller than Value B )
This will hide the plan if they don't have enough points, but if you want the plan to always be visible there's solutions for that as well using CB Auto Actions to force some custom validation behaviors. I can provide an example of how to do this as well if that's needed, but it's a bit more complicated.
Next using CBSubs Fields you'd subtract the points that the plan costs. This will entirely handle deducting points so you don't need CBSubs Promotions here. Example as follows.
Field: SELECT_POINTS_FIELD_HERE
Operator: Subtract: Field = Field - Value
Value: POINTS_COST_HERE
Remove value on plan deactivation: No
Now the auto renewing you'll need CB Auto Actions for that. The below should work to first check if they have enough points and if they do auto renew the plan. This will trigger CBSubs Fields and deduct their points so you shouldn't need to do anything further from here.
Global
Triggers: onCPayUserStateChange
Type: CB Paid Subscriptions
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 2
Field: Custom > Value
Custom Value: [var2]
Operator: Equal To
Value: X
Condition 3
Field: SELECT_POINTS_FIELD_HERE
Operator: Greater Than or Equal To
Value: POINTS_COST_HERE
Action
Mode: Renew
Plans: SELECT_PLAN_MATCHING_PLAN_ID_HERE
Be sure to replace PLAN_ID_HERE with the id of the plan being configured above. You'll need to do this once for each plan since I assume each plan will have a different cost. This should automatically renew the plan if they've enough points when it goes into an expired state.
The idea here is you have a points based payment system that does not interfere with normal payment processes. So for example you can have other plans that have an actual cost without these two systems conflicting. I do not suggest trying to use the dummy gateway as a solution as it's specifically designed for testing purposes only. If you really want a full payment flow then using the Offline gateway would be a better solution, but will require you to manually pay their baskets from backend.
Kyle (Krileon)
Community Builder Team Member
Before posting on forums:
Read FAQ thoroughly
+
Read our Documentation
+
Search the forums
CB links:
Documentation
-
Localization
-
CB Quickstart
-
CB Paid Subscriptions
-
Add-Ons
-
Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please
send me a private message
with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.