Forums

Chronoforms and SobiPro + Membership + Payment

FreshIdeas 21 May, 2012
I'd like to to create the following scenario and tell me if ChronoForms can do this...

A) New member joins and registers with ChronoForms
B) Pays via Paypal - recurring payments
C) Data from Chronoform populates (automatically) Sobipro Database
D) User received Joomla user credentials

If this can be done... HOW??????
GreyHead 21 May, 2012
Hi FreshIdeas,

You can do A, B and D I don't know anything about SOBIPro but that it probably possible if you can work out how to update the tables.

A works with the Joomla! Registration plug-in; B works either with one of the paid PayPal plug-ins or the ReDirect URl depending on how you want to set it up; D either requires an action tied to a PayPal notification or a manual admin approval.

Bob
the_fitz 08 Aug, 2012
Hi Bob,

I read this reply...

Hi FreshIdeas,

You can do A, B and D I don't know anything about SOBIPro but that it probably possible if you can work out how to update the tables.

A works with the Joomla! Registration plug-in; B works either with one of the paid PayPal plug-ins or the ReDirect URl depending on how you want to set it up; D either requires an action tied to a PayPal notification or a manual admin approval.

Bob



And realized that I need to do a simple paid membership.
I need a little more details on how to integrate the "Paid PayPal Plugin".

My client will have a business paypal account but NOT PayPal Payments Pro.
so
My Scenario would be
A. User inputs registration details
B. User gets redirected to Paypal to submit payment for the membership fee
C. ?? Get a PayPal IPN notification of success or failure.
D1. On success - complete the registration process
OR
D2. On failure display a failure message then "show stopper"

What I am not clear about is B. and C.

A little more detail would get me going in the right direction.

Thanks In advance for your help.
MrFitz
GreyHead 23 Aug, 2012
Hi the_fitz,

If it's a membership fee then you may not need IPN even. Just a simple redirect to PayPal will do the trick.

You need IPN if you are shipping goods (real or virtual) on payment and so you need to have the payment confirmed before you deliver. If it's a membership then - on the odd occasion where the payment fails - you can manually 'undo' the registration. Or you can set it up so that there is a manual confirmation of the registration once PayPal confirms payment.

IPN - Instant Payment Notification - is one of the PayPal systems to provide automatic confirmation of the status of a payment. The process flow is like this:
[list=a]
  • You complete the payment form on your site, assign the transaction a unique identifier and save the payment data

  • You redirect the user to PayPal along with the transaction data, the identifier and a Notify URL.

  • The User confirms the payment on the PayPal site (or not).

  • PayPal returns the transaction details in a 'behind-the-scenes' message to the Notify URL.

  • Your site receives the message, retrieves the corresponding transaction data and checks that the data from PayPal matches the data you sent with the user (a fraud prevention check) NB I don't think that the ChronoForms IPN action does this check automatically. You get a lot of information back from PayPal so I think it's worth saving the transaction record here.

  • Your site returns the data to PayPal as a confirmation

  • PayPal responds with the payment status.

  • Your site updates the transaction record with the status and acts accordingly - approving the membership, sending the goods, etc. Note that not all IPN messages are confirmations so you need to handle a range of responses.
  • [/list:o]
    Bob
    the_fitz 24 Aug, 2012
    Hi Bob,

    I DO need the IPN...
    I just need a few pointers on how to accomplish this...

    Hi the_fitz,

    If it's a membership fee then you may not need IPN even. Just a simple redirect to PayPal will do the trick.

    You need IPN if you are shipping goods (real or virtual) on payment and so you need to have the payment confirmed before you deliver. If it's a membership then - on the odd occasion where the payment fails - you can manually 'undo' the registration. Or you can set it up so that there is a manual confirmation of the registration once PayPal confirms payment.

    IPN - Instant Payment Notification - is one of the PayPal systems to provide automatic confirmation of the status of a payment. The process flow is like this:
    [list=a]

  • You complete the payment form on your site, assign the transaction a unique identifier and save the payment data
  • [/list:o]



    [list=a]
  • You mention saving the transaction record to get a unique identifier (I get that) but what field is sent to Paypal as this identifier? Do I need to identify the Paypal field name and then assign it the unique id? Do you know what the Paypal field name is?
  • [/list:o]

    b. You redirect the user to PayPal along with the transaction data, the identifier and a Notify URL.



    b. Ok, Got This

    c. The User confirms the payment on the PayPal site (or not).



    c. Ok, Got This

    d. PayPal returns the transaction details in a 'behind-the-scenes' message to the Notify URL.



    d. Ok, This is the returning IPN message..

    e. Your site receives the message, retrieves the corresponding transaction data and checks that the data from PayPal matches the data you sent with the user (a fraud prevention check) NB I don't think that the ChronoForms IPN action does this check automatically. You get a lot of information back from PayPal so I think it's worth saving the transaction record here.



    e. So the message will include the Unique ID (from above), I will access the record I saved (from above) and check to make sure that the fields are equal, if not fail...

    f. Your site returns the data to PayPal as a confirmation



    f. This is where I lose it... Is this done as part of the Paypal Listener module? This step is NOT mentioned in the FAQ titled 'How to use the PayPal Redirect Action'. How is this data returned? Using CURL? what is the data format? Is this another 'PayPal Redirect' event?

    g. PayPal responds with the payment status.



    g. Is this done as part of the Paypal Listener module? Or do I have to add another listening module for this response?

    h. Your site updates the transaction record with the status and acts accordingly - approving the membership, sending the goods, etc. Note that not all IPN messages are confirmations so you need to handle a range of responses.



    h. Is this done as part of the Paypal Listener module? Or do I have to add another listening module for this response? I assume that the potential responses are listed somewhere on the payPal site....


    Thanks in advance for your time.
    MrFitz
    GreyHead 25 Aug, 2012
    Hi MrFitz,

    Please check the PayPal docs here for a better description of the IPN process than I can write.

    You mention saving the transaction record to get a unique identifier (I get that) but what field is sent to Paypal as this identifier? Do I need to identify the Paypal field name and then assign it the unique id? Do you know what the Paypal field name is?

    This is mostly so that you can identify the saved transaction details. I usually assign a random string to the action using the Unique ID [GH] action to generate it and put it in the PayPal Invoice number field.

    So the message will include the Unique ID (from above), I will access the record I saved (from above) and check to make sure that the fields are equal, if not fail...

    Ideally, yes. The check isn't essential to the process. I Would do it but I don't believe that Max's IPN Listener action does. The transaction with PayPal will still complete but there is a small gap for a fraudulent change there.

    f. This is where I lose it... Is this done as part of the Paypal Listener module? This step is NOT mentioned in the FAQ titled 'How to use the PayPal Redirect Action'. How is this data returned? Using CURL? what is the data format? Is this another 'PayPal Redirect' event?
    g. Is this done as part of the Paypal Listener module? Or do I have to add another listening module for this response?
    h. Is this done as part of the Paypal Listener module? Or do I have to add another listening module for this response? I assume that the potential responses are listed somewhere on the payPal site....

    It's part of the Listener transaction. PayPal sends the data, your site returns the same data as confirmation to PayPal, then PayPal sends the payment status. (See the 'IPN Protocol and Architecture' section from the PayPal docs linked above.)

    Bob
    the_fitz 25 Aug, 2012
    Hi Bob,

    Wow, I am just not getting it....

    Hi MrFitz,

    Please check the PayPal docs here for a better description of the IPN process than I can write.

    You mention saving the transaction record to get a unique identifier (I get that) but what field is sent to Paypal as this identifier? Do I need to identify the Paypal field name and then assign it the unique id? Do you know what the Paypal field name is?

    This is mostly so that you can identify the saved transaction details. I usually assign a random string to the action using the Unique ID [GH] action to generate it and put it in the PayPal Invoice number field.

    So the message will include the Unique ID (from above), I will access the record I saved (from above) and check to make sure that the fields are equal, if not fail...

    Ideally, yes. The check isn't essential to the process. I Would do it but I don't believe that Max's IPN Listener action does. The transaction with PayPal will still complete but there is a small gap for a fraudulent change there.



    Ok, Im good to here...

    f. This is where I lose it... Is this done as part of the Paypal Listener module? This step is NOT mentioned in the FAQ titled 'How to use the PayPal Redirect Action'. How is this data returned? Using CURL? what is the data format? Is this another 'PayPal Redirect' event?
    g. Is this done as part of the Paypal Listener module? Or do I have to add another listening module for this response?
    h. Is this done as part of the Paypal Listener module? Or do I have to add another listening module for this response? I assume that the potential responses are listed somewhere on the payPal site....

    It's part of the Listener transaction. PayPal sends the data, your site returns the same data as confirmation to PayPal, then PayPal sends the payment status. (See the 'IPN Protocol and Architecture' section from the PayPal docs linked above.)Bob



    So, are you saying that the Paypal Listener module handles both sets of communication with paypal, Gets the confirmation info, Returns the info to Paypal, and then Gets the Payment status?

    If that is the case then I am doing something very wrong. I get NO anything when I send back an IPN from the paypal sandbox (the listener is in sandbox mode), no response from the listener, no action in any way???

    Can You suggest a method of troubleshooting? Once I get it working in the sandbox then I will buy both modules Paypal Redirect and Paypal Listener.

    Thanks in advance for your time.
    MrFitz
    GreyHead 25 Aug, 2012
    Hi MrFitz,

    So, are you saying that the Paypal Listener module handles both sets of communication with paypal, Gets the confirmation info, Returns the info to Paypal, and then Gets the Payment status?

    I just looked at the code and that certainly seems to be what it's supposed to do.

    It's tricky to troubleshoot though because all the transactions are behind the scenes so you can't echo out or print anything :-(

    When I build these I usually add logger code so that you can see the ChronoForms end of the transaction.

    I can't see any easy way of dumping the transaction results without hacking the action code.

    What do you have in the Notify URL you are using?

    Bob
    the_fitz 28 Aug, 2012

    Hi MrFitz,

    When I build these I usually add logger code so that you can see the ChronoForms end of the transaction.



    Really, How is this done?

    I can't see any easy way of dumping the transaction results without hacking the action code.

    What do you have in the Notify URL you are using?

    Bob



    Well, its http://www.posloyalty.com/gogreen_dev/index.php?option=com_chronoforms&chronoform=order_card&event=ipn However, I will have several different payment scripts (once I get this one working) and they will all have different Notify URL's so How do I pass this in a script??

    I don't know what to expect to occur when I simulate the ipn from PayPal. Could you give me a hint?
    Should I be in sandbox mode for both the listener and redirector?

    I need this to work.
    Thanks in advance for all your help.
    MrFitz
    GreyHead 29 Aug, 2012
    Hi TheFitz,

    Here's the simple version of the logging code (lifted and edited from one of my actions).
    <?php
    jimport( 'joomla.error.log' );
    $log =& JLog::getInstance( 'paypal.log.php' );
    . . .
    $message = 'something to log';
    $log->addEntry( array( 'comment' => $message ) );
    ?>

    You can set the notify_url parameter in the same way as any other parameter you send to PayPal. If you set this then it will over-ride any master setting in the PayPal account setup.

    I'm not sure how best to test this. In the past I've used an IPN tester at BelaHost.com but this site is showing 'up for sale' this morning when I checked. The PayPal IPN tester here looks like the main tool at the moment.

    Bob
    This topic is locked and no more replies can be posted.