next_payment_date Paypal IPN not working (Recurring_payments) - paypal

Paypal is returning this:
[next_payment_date] => 03:00:00 Mar 14, 2014 PDT
and this
[time_created] => 10:47:34 Mar 14, 2014 PDT.
The billing cycle is set to a month, why is Paypal returning the same date for the next_payment_date? It should be on April. Where could the problem be?

And have the first payment been taken ? When you create new profile first payment is set on the same day as start date is set. Mext month you should get when you will receive first recurring payment notification.

Related

Finding the paypal subscription end date upon cancel

Upon cancel, I want to know how much time is left on the subscription's current billing cycle.
This question -- paypal-ipn-get-subscription-end-date-recurring got answered with a scenario where, upon the end of the cancellation period, a paypal event is sent at the end date. In my case, however, I want to know in advanced how much time is remaining and record a future date (like a credit) and allow the user to use that up that time or give them an advance on their signing up again with another payment method (delay their next bill for example).
There is a final_payment_date under the deprecated billing agreements API: https://developer.paypal.com/docs/api/payments.billing-agreements/v1/ .. They say to use the subscription's API, but there is no end date available. It is possible to use the subscription API to set things up and still use this API.
Unfortunately, because I don't see a non-deprecated end-date anywhere I think I may need to dive into the implementation here:
https://developer.paypal.com/docs/paypal-payments-standard/integration-guide/subscription-billing-cycles/?mark=cycle#
Paypal's Monthly example from the link above. "[...] signs up on Tuesday, December 30, the subscriber is billed as follows:"
Tuesday, December 30 = $25.99 USD
Friday, January 30 = $25.99 USD
Sunday, March 1= $25.99 USD
Wednesday, April 1= $25.99USD
I'm close, instead of ending up on March 1st, I end up on March 2nd:
> d=new Date('2017-12-30')
2017-12-30T00:00:00.000Z
> d.setMonth(d.getMonth() + 1); d
2018-01-30T00:00:00.000Z
> d.setMonth(d.getMonth() + 1); d
2018-03-02T00:00:00.000Z
> d.setMonth(d.getMonth() + 1); d
2018-04-02T00:00:00.000Z
In any event, looks like I need to save the subscription's first billing time and as long as the plan is still active and current on payments, I'll have to calculate when their next bill will be.
BILLING.SUBSCRIPTION.CREATED (webhook received)
Status ACTIVE resource id I-79CLVAS5XM95
As a point of reference, the BILLING.SUBSCRIPTION.CREATED create_time is 2020-06-05T19:45:08.868Z.
Save resource.id = I-79CLVAS5XM95
Also save a date here, will use it to calculate the billing cycle
resource.billing_info.next_billing_time = 2020-06-05T19:35:10Z
Or resource.start_time = 2020-06-05T07:00:00Z ?
Lookup resource.plan_id => https://api.sandbox.paypal.com/v1/billing/plans/P-1BC0896985601515LL3FNLCQ
Get billing_cycles.frequency.interval_unit = DAY|WEEK|MONTH and interval_count. For example, if the interval_unit is DAY with an interval_count of 2, the subscription is billed once every two days.
plan.billing_cycles
[{
pricing_scheme: {
version: 1,
fixed_price: { currency_code: 'USD', value: '0.01' },
create_time: '2020-05-24T20:14:02Z',
update_time: '2020-05-24T20:14:02Z'
},
frequency: { interval_unit: 'DAY', interval_count: 1 },
tenure_type: 'REGULAR',
sequence: 1,
total_cycles: 0
}]
This question -- paypal-ipn-get-subscription-end-date-recurring got answered with a scenario where, upon the end of the cancellation period, a paypal event is sent at the end date. In my case, however, I want to know in advanced how much time is remaining and record a future date
To know in advance, use resource.billing_info.next_billing_time, not the resource.start_time (checkout time)
The example you quoted above:
Tuesday, December 30 = $25.99 USD
Friday, January 30 = $25.99 USD
Sunday, March 1= $25.99 USD
Wednesday, April 1= $25.99USD
Is due to February's shortness. February doesn't have a 30th to charge on, so PayPal opts to push the subscription forward to March 1 to keep everything roughly 30 days apart. This is explained in the documentation you linked to.

How to display previous year totals into current year in Tableau??without creating parameter

I need to create a field of previous year total sales in the current year column.
Here is an example based on it being 2018 today: in 2018, it should be 2017 total sales(full year), in 2019, it should be 2018 Sales(jan-apr would be only months in may), and 2020 should be blank, as there are no data in 2019 yet, etc.
Use the calculation to make it as "Date-1".

How does Payflow Gateway Recurring Billing handle monthly billing with a start date near the end of the month?

If the start date is set to the 29th, 30th, or 31st, and the PAYPERIOD is set to MONT (monthly), what happens on (for example) Jan 31st? Is the next billing period set to Feb 28th (or 29th on a leap year)? Should I just bump all recurring payments starting on those 3 days to the 1st of the next month?

Recurring payments - how long is a month?

For monthly recurring payments, how long is a month defined to be? I need to be able to independently track subscription end dates on my web service and I'd like to be consistent with PayPal.
As said on PayPal's documentation:
How Subscriptions with Monthly Billing Cycles Work
For monthly billing cycles, recurring payments are collected on the
same day of the month. If the initial recurring payment falls on the
31st, PayPal eventually adjusts the billing cycle to the 1st of the
month. If the initial recurring payment falls on the 29th or 30th,
PayPal adjusts the billing cycle to the 1st of the month on the
following February.
When Monthly Recurring Payments Are Due and Collected on the 31st
The subscription terms are:
$25.99 USD a month; the subscriber signs up on Thursday, July 31. The
subscriber is billed as follows:
Thursday, July 31 = $25.99 USD Saturday, August 31 = $25.99 USD
Wednesday, October 1= $25.99 USD Saturday, November 1= $25.99 USD and
so on... Notice that no recurring monthly payment was collected in
September, but recurring payments were collected roughly every 30
days.
When Monthly Recurring Payments Are Due and Collected on the 30th
The subscription terms are:
$25.99 USD a month; the subscriber signs up on Tuesday, December 30.
The subscriber is billed as follows:
Tuesday, December 30 = $25.99 USD Friday, January 30 = $25.99 USD
Sunday, March 1= $25.99 USD Wednesday, April 1= $25.99USD and so on...
Notice that no recurring monthly payment was collected in February,
but recurring payments were collected roughly every 30 days.
Read more at https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/subscribe_buttons/

Time stamp issue while adding event in facebook using graph API

What is the valid format for start_time and end_time while adding an event using graph api ...
i tried adding an event using unix time stamp .. however its not showing the same date when the event is published ..
when i give start_time as 1293802200 which is 31st Dec 2010 07:00 pm .. it shows as 31st Dec 5:30am on facebook ..
what is it that am doing wrong .. do i need to consider time zone issues as well ??
Regards
Abhishek Jain
According to http://developers.facebook.com/docs/reference/api/event/ it seems that you need to specify date in the Pacific time zone (PST).
Now, the timestamp value you provided is 31st Dec 2010 19:00 in India indeed which corresponds to same day, 5:30 in Pacific time.
In conclusion, convert your local time to Pacific time (PST) prior to uploading it to Facebook.