[eluser]spheroid[/eluser]
Got the Paypal IPN Library working great! But...I can't add payment and cart info to my db tables in the model. I can email the results though. Here's what I have:
Controller
Code:
function ipn()
{
if ($this->paypal_lib->validate_ipn())
{
if ($this->paypal_lib->ipn_data['txn_type'] == "cart")
{
$this->load->model('Store_model', '', TRUE);
$this->Store_model->paypalIPNInsertCartPaymentInfo();
$this->Store_model->paypalIPNInsertCartItemInfo();
}
}
}
Model
Code:
function paypalIPNInsertCartPaymentInfo()
{
$datecreation = date("Y").date("m").date("d");
$updatedata = array(
'paymentstatus' => $this->paypal_lib->ipn_data['payment_status'],
'buyer_email' => $this->paypal_lib->ipn_data['payer_email'],
...
);
$this->db->insert('paypal_payment_info', $updatedata);
}