Hello,
We need a PHP script that performs calculations based on different dates. We sell a service online and need to setup payment options for memberships that expire on certain days.
Example:
Price of a discounted 3-month membership: $84.00 (Standard membership: $90.00)
Price of a discounted 6-month membership: $159.00 (Standard membership: $180.00)
Price of a discounted 12-month membership: $299.00 (Standard membership: $360.00)
Memberships always expire in the end of a yearly quarter. The script has to calculate the actual price of the discounted and standard memberships based on today's date (server time) and the different expiration dates.
e.g.
Today's date: Jan 21
Expiration Dates: Mar 31, Jun 30, Sep 30 and Dec 31.
Sample Output:
Discounted membership until Mar 31: $ XXX.00 (Standard membership: $XXX.00 - Save $ XXX.00)
Discounted membership until Jun 30: $ XXX.00 (Standard membership: $XXX.00 - Save $ XXX.00)
Discounted membership until Sep 30: $ XXX.00 (Standard membership: $XXX.00 - Save $ XXX.00)
Discounted membership until Dec 31: $ XXX.00 (Standard membership: $XXX.00 - Save $ XXX.00)
Parts of above data also need to be integrated into the payment links. The minimum membership duration is two months, so in e.g. February there won't be a membership option that expires on Mar 31.
Thanks!