PayPal infinite billing plan - how to create? - paypal

I am trying to create an infinite billing plan with the PayPal API, but I am unsure how to create this.
If I try to set total_cycles to 0 the API rejects this as invalid input with the response that total_cycles must be between 1-999.
Using total_cycles: 999 as a value returns this as invalid input with the response that total_cycles must be between 1-999!
Using total_cycles: 998 is accepted! Grr!
There appears to be an "off by 1" error in the API at the very least.
So: How does one create an infinite subscription? I don't want subscriptions to end after 998 occurrences.

According to their own documentation, 0 is the correct value.
The number of times this billing cycle runs. Trial billing can only
have maximum value of 1 for total_cycles. In case of infinite regular
billing cycle, total_cycles can be set to 0. For finite regular
billing cycle, total_cycles can be set between 1 and 999. Default: 1.
Minimum value: 0.
Maximum value: 999.
Sounds like a bug. You should report an issue if it's still a problem: https://github.com/paypal/paypal-checkout-components/issues
Update
I just tried it with 0 in their sandbox environment and it appears to have worked.

Related

Braintree Prorate amount is wrong

I have two plans.
The first one is 4.99€.
The second one is 9.99€.
When using prorate_charges = true option.
I pick the 4.99€ subscription, the transaction amount is 4,99 €.
Now I want to upgrade from the 4.99€ plan to the 9.99€ plan and apply the prorate charges. I should pay 5€ on day one since 9.99€ - 4.99€ but instead of paying 5€, braintree generate a transaction with an amount of 4,83 € and I don't know why. The billing cycle is set to one month but It looks like it calculate the proration without 1 day.

While creating test cases on DevOps i am getting error as Steps exceeds the maximum allowed length of 1048576

While creating manual test cases on the DevOps platform, I am getting the following error after 19 steps.
Error: TF401262: Value of long text field Microsoft.VSTS.TCM.Steps exceed the maximum allowed length of 1048576.
I am adding Action and the expected result fields for each step.
Expected Results contains text and reference screenshots.
After the 19th step, it is not accepting screenshots in the "expected result" field.
While creating test cases on DevOps i am getting error as Steps exceeds the maximum allowed length of 1048576
Generally String fields take a max of 255 characters. PlainText/HTML will take a max of 32K. If it crosses this limits, you can try to store it to a file and add it as an attachment:

Paypal Rest api: billing plan, payment_definitions meaning of "cycles"

I would like to setup a paypal billing plan with monthly payments similar to e.g. github. The customer gets charged $7 every month.
I am struggling with the property cycles. The api document says cycles = "Number of cycles in this payment definition".
Does this mean the payment definition has to include the values:
"frequency_interval": "1",
"frequency": "MONTH",
"cycles": "1",
Or should cycles have the value "0"?
For what i understood, cycles it's the number of time the payment will be done (if you put 12, it will last 12 occurency -> 1 year). You can put 0 only if the plan's type is "INFINITE", the plan will last forever until you stop it.
So you have to put 0 if you want it never to stop.

We have a report that prints details for Pending Change Orders for jobs.

We need the total to subtract the amount if there is a PCO Status "rejected". How do we do this?
The report itself prints details of each pending change order, then totals those pending change orders at the end. However, sometimes the pending change order is rejected, leaving it Status 'R', which we would not want included in the total. We want to make a formula, but are not entirely sure how to do this successfully.
Thanks in advance!
Assuming that each change order is a row in your report, you can sum those that do not have a status of rejected by creating a formula that simply returns 0 for those rows:
if isnull({PCO.Status}) or not({PCO.status}="rejected") then {PCO.NumberToSum} else 0
Then you just need to insert a sum() summary into your report on this new formula field.
one way would be take the total sum in one variable and rejected sum in another variable and subtract the both and print final result.
//For Rejected
Local Numbervar a;
If (Status='R') Then a:=sum(Total);
//Total with rejected
Sum(Total);
//For total without rejected
Sum(Total)-a;

Pass variable cart total to PayPal for Subscription (using Enhanced Recurring Payments w. Website Payments Standard)

Summary: Trying to pass along a variable Monthly Subscription cost to PayPal based on user-selected options on a form I created. Working within Website Payments Standard with Enhanced Recurring Payment option, is this possible?
Details:
User visits "shop" page, which is a form with 4 line items, each line item consisting of 2-7 options, each option with an associated price.
For example, line item 1 is "size of business" with the options being:
a) 1-3 employees - $10
b) 4+ employees - $12.50
User goes through the list and chooses 1 option for each line item and some javascript calculates the total due on the fly.
Is it possible to pass this total to PayPal, not as a one-time cost, rather as the base cost for a monthly subscription?
Yes. Just change the value you're passing for a3, rather than amount.
Is there a problem you're running into?