Thanks for the excellent question Sam.~ thanks for your patience.I assume that you're using s2Member Pro Forms with a PayPal Pro account, or no?
With PayPal, you have to create what they call a "Subscription" or with PayPal Pro, it's called a "Recurring Profile". In either case, you can offer a free trial period, and if the trial is cancelled, no billing will occur. That's how most sites handle this. In the case of PayPal Standard Buttons, each Customer paying you on a recurring basis, will have a PayPal account of their own, which they can log into and cancel future billing. In the case of s2Member Pro Forms, working together with your PayPal Pro account, you can generate a Billing Cancellation Form with s2Member Pro inside your Dashboard, and make it available to your Members if you like.
Although many Customers don't realize it, all credit card transactions involve a two step process that is handled by the merchant. First, you "Authorize" a certain dollar amount on their card. This "Authorization" will place a temporary hold on the funds, in whatever dollar amount you and the Customer have agreed upon. Most banks will leave this temporary "Authorization" ( i.e. they'll hold the funds in reserve, for you, as the merchant ), for up to around 30 days, although this differs from bank to bank.
The second step sometimes occurs together at the same time as the "Authorization", or sometimes it occurs several days or weeks later. The second step is called a "Capture". This is where the merchant actually "Captures" the funds that were originally "Authorized" ( i.e. the merchant gets paid in this step ).
By default, both PayPal Standard and s2Members' integration with PayPal Pro, will create either a "Subscription" or "Recurring Profile" with PayPal Pro, and you may configure a trial period if you like. The trial period can be completely free, or you can charge a different fee for the first X number of days/weeks/months. However, neither of these integrations are setup to provide what I would consider to be "very advanced billing practices". In cases where you need to start a paid trial, then handle dynamic refunds upon cancellation, I would suggest that you make an attempt to interface directly with the PayPal Pro API. The PayPal Pro API does allow for more advanced temporary "Authorizations", and dynamic "Refunds". But I'm sorry, advanced customization of these API calls goes outside the scope of what s2Member services. You might want to have a look here:
https://cms.paypal.com/us/cgi-bin/?cmd= ... d_sdks#NVPOr you can download /s2m-pro-extras.zip inside your account at s2Member.com. Inside that file you will find a PDF file that documents the entire PayPa Pro API for developers.
I should also note that s2Member Pro makes a utility function available, which makes it easy for site owners to communicate with the PayPal Pro API. I've provided a code sample here:
viewtopic.php?f=4&t=2062#p7407The same concept you'll see in that thread, also applies to almost all PayPal API calls.
- Code: Select all
<?php
$paypal = array(); if (($paypal = c_ws_plugin__s2member_paypal_utilities::paypal_api_response ($paypal)) && empty($paypal["__error"]))
print_r($paypal); ?>