Database 定期付款paypal在数据库中插入数据

Database 定期付款paypal在数据库中插入数据,database,codeigniter,paypal,Database,Codeigniter,Paypal,我已成功集成CreateRecurringPaymentsProfile方法,该方法将从客户处重复付款。现在我需要做的是: 在每个月的收款后,我需要在我的数据库表中插入数据。付款完成后,我是否收到贝宝的回复? 或者,如何在每个时间段之后在数据库中插入数据 谢谢大家阅读我的帖子。我期待着你的职位-任何建议都欢迎 问候,, anstrangelover您需要查看API以及paypal提供的: IPN可以发送这些事务的通知: Instant payments, including Express

我已成功集成
CreateRecurringPaymentsProfile
方法,该方法将从客户处重复付款。现在我需要做的是:

在每个月的收款后,我需要在我的数据库表中插入数据。付款完成后,我是否收到贝宝的回复? 或者,如何在每个时间段之后在数据库中插入数据

谢谢大家阅读我的帖子。我期待着你的职位-任何建议都欢迎

问候,,
anstrangelover

您需要查看API以及paypal提供的:

IPN可以发送这些事务的通知:

Instant payments, including Express Checkout and direct credit card payments
eCheck payments and pending, completed, or denied status payments
Pending payments
Recurring payments and subscriptions
Authorizations
Disputes, chargebacks, reversals, and refunds
我使用这个库:

这对我来说很有效。我创建了一个order_模型,该模型映射到一个表,该表与我希望从IPN中获得的字段相匹配,然后我使用如下方法制作了一个控制器:

function ipn(){
    $this->load->library("paypal_lib");
    $res = $this->paypal_lib->ipn();

    $response = print_r($res, TRUE);
    log_message('error', $response);

    if(isset($res["error"])) {
        log_message('error', 'fail');
        return;
    }
    if($res["verified"]) {
        log_message('error', 'verified');
        $res["payment"] = "paypal";
        $new_order = $this->order_model->create($res["data"]);  
        log_message('error', 'created order: '.$new_order['id']);           
    } else {
        log_message('error', 'no error, but not verified?');
    }
}

谢谢你的帖子,真的很有帮助:)。我要去看看