Community Support Forums — WordPress® ( Users Helping Users ) — 2011-07-17T00:17:31-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14079 2011-07-17T00:17:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14079&p=28560#p28560 <![CDATA[Re: Option: Pay upon registration, canceled before trial..]]> Thanks for the follow-up!

Yes. Search the PayPal Pro API docs for:
ManageRecurringPaymentsProfileStatus
Code:
<?php
$user_id 
= "1";
$subscr_id = get_user_option("s2member_subscr_id", $user_id);
$paypal = array ("METHOD" => "ManageRecurringPaymentsProfileStatus", "ACTION" => "Suspend", "PROFILEID" => $subscr_id);
if (($paypal = c_ws_plugin__s2member_paypal_utilities::paypal_api_response ($paypal)) && !$paypal["__error"])
    echo 'Your account has been placed into a suspended state.';
?>

ACTION ( shown in the code sample above ):
The action to be performed to the recurring payments profile.

- Cancel - Only profiles in Active or Suspended state can be canceled.
- Suspend - Only profiles in Active state can be suspended.
- Reactivate - Only profiles in a suspended state can be reactivated.

Statistics: Posted by Jason Caldwell — July 17th, 2011, 12:17 am


]]>
2011-07-13T21:08:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14079&p=28361#p28361 <![CDATA[Re: Option: Pay upon registration, canceled before trial..]]>
I was watching some infomercials late last night and Bingo :idea: I love the shark vacuum cleaner :)

I changed my business module to reflect some ideas I took form last night. Let's see what happen.

Do we have control over putting the membership on hold Jason. Like instead of them canceling, they can place their account on hold?

Sam

Statistics: Posted by drbyte — July 13th, 2011, 9:08 pm


]]>
2011-07-13T14:55:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14079&p=28304#p28304 <![CDATA[Re: Option: Pay upon registration, canceled before trial..]]> 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#NVP

Or 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#p7407

The same concept you'll see in that thread, also applies to almost all PayPal API calls.
Code:
<?php
$paypal 
= array(); // Your input array of data to send to the PayPal API.
if (($paypal = c_ws_plugin__s2member_paypal_utilities::paypal_api_response ($paypal)) && empty($paypal["__error"]))
 print_r($paypal); // Output array. See PayPal API docs for response variables that come from PayPal.
?>

Statistics: Posted by Jason Caldwell — July 13th, 2011, 2:55 pm


]]>
2011-07-11T08:47:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14079&p=26418#p26418 <![CDATA[Option: Pay upon registration, canceled before trial..]]>
How do I go by doing this:

I have a 3 days free trial membership but I want to do the following:

Upon registration, the member will pay the membership monthly fee then they will have access to the site. Now if they cancel the membership before the trial ends they will get their money back (refund). If they don't cancel it within the trial period, then it applies to the current month membership.

I am having people signing in with a valid credit card but the problem is that PayPal do not verify if there is any funds in the credit card. I know that there could be so many things that could result to no funds but those kind of people I am trying to avoid. Basically they are getting away with free membership and that's not helping at all. Not all think that way but they are getting there..I suppose lost are hurting for money and looking for free entertainment.

Now, to make sure there is no foul play, I suppose explaining that upon registration, their credit card will be charged the full monthly fee. If they choose to cancel within the trial period then they get a full refund. That refund will be credit to their card within 3 to 5 business days.

I suppose I could do that manually but something automated function will help allot when you have hundreds of members.


Thank you Jason

Sam

Statistics: Posted by drbyte — July 11th, 2011, 8:47 am


]]>