simple username/password question...

Discussion in 'Pre-Sales Questions' started by phpnoob, Jul 7, 2008.

  1. phpnoob

    phpnoob New Member

    Joined:
    Jan 6, 2008
    Messages:
    2
    Hello can someone answer this please?

    When payment is returned to my site as successful from paypal signup, can I insert that user email and password to a 2nd separate database? If so then I imagine I could pass other values along too upon successful member creation, correct?

    Thank you!
    :)
  2. jimjwright

    jimjwright New Member

    Joined:
    Sep 12, 2007
    Messages:
    162
    Hello,

    If you have some coding skills you can do it the following 2 ways

    1. Modify the paypal IPN (Instant Payment Notification) code. From the payment record find the user record. Then you can write whatever you want from user record into your second database.

    2. Add plugin hook code into site.inc.php as follows:

    PHP:

    Add to site
    .inc.php

    function fwp($payment_id){   
        global 
    $db;
        
    $payment $db->get_payment($payment_id);
        
    $product $db->get_product($payment['product_id']);
        
    $member $db->get_user($payment['member_id']);
        
    //
        // Add code to write to second database
        //
    }

    setup_plugin_hook('finish_waiting_payment''fwp');

    Jimmy
  3. phpnoob

    phpnoob New Member

    Joined:
    Jan 6, 2008
    Messages:
    2
    Thanks so much, Jimmy... yes my php skills are coming together and it doesn't look too rough.

Share This Page