08-30-2008, 11:41 AM
[eluser]m4rw3r[/eluser]
You have to pass the $paypal_custom_field as a parameter to verify_payment():
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');
}