Simple paypal_r interface

Discussion in 'Payments processing' started by nc3man, Mar 29, 2011.

  1. nc3man

    nc3man aMember Pro Customer

    Joined:
    Sep 30, 2010
    Messages:
    42
    I have set up the paypal_r plugin. It is working fine for our site, but am curious if there is a way to hook up to the simpler credit-card only payment option provided by Website Payments Standard. For example when a user signs up or adds/renews the PayPal dialog on the right of the payment screen offers either a PayPal login for PayPal members or the option to enter a credit card and additionally create a PayPal account. Is that the only way it can be configured? On the PayPal site under the Business description for Website Payments Standard it shows a simple credit card image which is supposed to allow you to pay with a credit card withOUT a PayPal login, or use your PayPal login, but only optionally. It says "your customers don't even need a PayPal account." How can we do that in aMember?
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    hi,
    First of all this is possible with Website payments standart only for not recurring payments. if you use WPS for recurring payments, your users must have paypal account in order to pay. if you want to accept CC on paypal for recurring payments you have to use paypal Premium payments or paypal Website payments PRO.
    Also, paypal will decide what to show for end-user, if user have paypal account and logged into account before, paypal will ask to login into existing account, if user don't have paypal account, he will be asked to pay with CC(of course this is valid only for not recurring payments)
  3. nc3man

    nc3man aMember Pro Customer

    Joined:
    Sep 30, 2010
    Messages:
    42
    None of our subscriptions have recurring payments, as our members need to accept a liability waiver each year. I have followed all the paypal_r configuration instructions (unless they were out of date). The screenshot included here is what I see. Note that it only has two options: PayPal login or Create PayPal account. I was hoping to see a third option, for credit card only without the PayPal login. I have not selected Recurring Payment on our products and on Website Payments Standard website options, I have checked "Credit Cards Optional". Is there something else I need to do to enable this for our instant payments?
    Thanks for the quick reply[​IMG]
  4. nc3man

    nc3man aMember Pro Customer

    Joined:
    Sep 30, 2010
    Messages:
    42
    Note that I am testing this in a PayPal "sandbox" account (screenshot in previous post). Will the interface change when I go to a live account? I have also contacted PayPal if this is outside of any control by aMember.
  5. nc3man

    nc3man aMember Pro Customer

    Joined:
    Sep 30, 2010
    Messages:
    42
    I'm attaching a screenshot which is what I expect to see. This is for a PayPal Donate button (not part of aMember PRO, but I have it linked to the same PayPal account I am using for aMember). Note that in the bottom left, I can use a credit card without a PayPal login. This is exactly what I want to see for our aMember subscription payments. There must be some setting in my aMember config I am missing or else the php code is perhaps sending the wrong variables to PayPal. Is it possible, aMember is sending this as "Recurring"? I do not have Recurring checked in any of my products. I also might add that if I say "Yes" to sandbox testing under CP > Setup > PayPal, that I do get the correct behavior. [​IMG]
  6. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    This does not depends on aMember. paypal choose what page to display somehow.
  7. nc3man

    nc3man aMember Pro Customer

    Joined:
    Sep 30, 2010
    Messages:
    42
    Since I get a different screen depending on whether I have set sandbox testing as Yes or No in your PayPal plugin, I believe there may be a bug in that aMember is telling PayPal this is a recurring payment. I get only two options (login/create) when sandbox testing is "No" (screenshot http://northcountycycleclub.com/amember/payPalScreenshot.png). When I set sandbox testing to "Yes", I then get the expected 3 options (login/create/credit card) similar to what you see in the screenshot http://northcountycycleclub.com/amember/payPalDonateScreen.png. How can I debug what aMember is sending to PayPal? Is it logged somewhere? Is there a way I can completely disable RECURRING? (in ipn.php, I noticed there is a conditional which sets it to 1 or 0). I do believe PayPal is sending me the two different screens depending on whether they are being told by aMember that the payment is recurring (or maybe some other switch).
  8. nc3man

    nc3man aMember Pro Customer

    Joined:
    Sep 30, 2010
    Messages:
    42
    I opened a ticket with PayPal support and they said I got the PayPal only interface because the transaction is a "Subscription". I went in and poked around paypal_r.inc.php and saw the following code snippet:
    PHP:
            $vars = array(
                
    'cmd'         => '_xclick-subscriptions',
                ...
    Looking at the PayPal integration interface, it looks like a change to
    PHP:
            $vars = array(
                
    'cmd'         => '_xclick',
                ...
    would change the transaction from a "Subscription" to a "Buy Now" which is really what I want. We do not want recurring transactions as members need to actively renew each year. If I make this change, does that make sense? Will I suffer dire consequences? Note that I still am in integration mode, working primarily with a PayPal Sandbox account, so there's not too much to lose.

    Any comments by anyone who has tried anything similar would be appreciated.
  9. nc3man

    nc3man aMember Pro Customer

    Joined:
    Sep 30, 2010
    Messages:
    42
    The simple solution changing 'cmd' did not work. The aMember plugin is just hard-wired to use Subscription instead of a BuyNow transaction for non-recurring payments. Too much trouble for me to try and figure out a fix. I did something which works OK, though. We have the offline plugin set up to send in a personal check for those who still don't trust on-line payments. In offline.html, I added a second option for non-PayPal credit card payments - I just created a "BuyNow" PayPal button, with all our membership categories, and pasted it into the form. People will then be able to use a credit card but the aMember admin will then need to manually complete the transaction, which is still easier than picking up a personal check in the mail, depositing it in the bank, manually recording in aMember.
  10. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    nc3man,
    There are two places in paypal plugin where amember setup vars to redirect user for payment:
    function do_recurring_bill - which is used to handle recurring payments, so it set cmd to _xclick-subscriptions
    and do_not_recurring_bill which is used for not recurring products and that set cmd to _xclick
    If you still see that aMember use cmd _xclick-subscriptions when you are redirected to paypal, this mean that product is recurring. Double check settings in aMember CP -> Manage products -> Edit Product
    Also make sure that Trial fields are empty and do not have any values set.

    Also, in regards you manual solution.
    You can do this even simpler. If you have latest version, enable aMember CP -> Setup -> paypal -> Allow to create accounts.
    Then configure IPN in paypal so that it will point to amember's IPN script, then you will be able to just use paypal buttons and do not use amember's signup form at all.
    Process flow will be as follows:
    user will go to your site will click paypal "pay now" button and will be redirected to paypal for payment.
    After sucessfull payment, user will be redirected back to your site and aMember will create account for user automatically. Login and password will be sent to user by mail.
  11. nc3man

    nc3man aMember Pro Customer

    Joined:
    Sep 30, 2010
    Messages:
    42
    solved

    Thank you, Alexander. I carefully checked all settings, deleted cookies from my browser, and I finally get the correct behavior as in the screenshot below. This was mostly a learning experience for me, digging into the details of the PayPal <--> aMember PRO transaction interface. It all works smoothly as you have described, with the user getting the option to pay with credit card only if they don't have a PayPal account for non-recurring subscriptions. My problem with testing is that I didn't always clean out browser cookies, and you get a different interface if PayPal knows you have a login.
    [​IMG]
  12. tlestra

    tlestra New Member

    Joined:
    Feb 18, 2010
    Messages:
    3
    "Process flow will be as follows:
    user will go to your site will click paypal "pay now" button and will be redirected to paypal for payment.
    After sucessfull payment, user will be redirected back to your site and aMember will create account for user automatically. Login and password will be sent to user by mail. "

    I am sorry, do you mean the user will receive the login and password by "email" or by "mail"?
  13. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Sorry for confusion, by email of course.

Share This Page