Welcome Guest, Not a member yet? Register   Sign In
Passing Data to a Model
#2

[eluser]m4rw3r[/eluser]
You have to pass the $paypal_custom_field as a parameter to verify_payment():

Code:
// controller
$this->load->model('regform_model', '', TRUE);
$this->regform_model->verify_payment($this->paypal_lib->ipn_data['custom']);

// model
function verify_payment($field)
    {
        $paypal = explode(":", $field);
        $this->db->where('first_name', $paypal[0]);
        $this->db->where('last_name', $paypal[1]);
        $this->db->where('email', $paypal[2]);

        $this->db->set('payment_received', TRUE);
        $this->db->update('table_name');
    }


Messages In This Thread
Passing Data to a Model - by El Forum - 08-30-2008, 11:09 AM
Passing Data to a Model - by El Forum - 08-30-2008, 11:41 AM
Passing Data to a Model - by El Forum - 08-30-2008, 12:06 PM
Passing Data to a Model - by El Forum - 08-30-2008, 12:09 PM
Passing Data to a Model - by El Forum - 08-30-2008, 12:11 PM
Passing Data to a Model - by El Forum - 08-30-2008, 12:13 PM
Passing Data to a Model - by El Forum - 08-30-2008, 12:24 PM
Passing Data to a Model - by El Forum - 08-30-2008, 12:42 PM
Passing Data to a Model - by El Forum - 08-30-2008, 12:42 PM
Passing Data to a Model - by El Forum - 08-30-2008, 12:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB