0

CreateRecurringPaymentsProfileクライアントからの支払いを繰り返す統合メソッドに成功しました。今私がする必要があるのは:

毎月の定期的な支払いの後、データベース テーブルにデータを挿入する必要があります。支払いが完了した後、paypal から応答があることはありますか? または、各期間の後にデータベースにデータを挿入するにはどうすればよいですか?

私の投稿を読んでくれてありがとう。あなたの投稿を楽しみにしています - どんな提案でも大歓迎です。

よろしく、 anstrangelover

4

2 に答える 2

1

Paypalが提供するAPIなどを調べる必要があります。

https://www.x.com/developers/paypal/products/instant-payment-notification

https://www.paypal.com/ipn

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
于 2012-06-21T07:20:11.083 に答える
0

私はこのライブラリを使用しています: http://codeigniter.com/wiki/PayPal_Lib/

それは私にとってかなりうまくいきます。IPN から必要なフィールドに一致するテーブルにマップする order_model を作成し、次のようなメソッドでコントローラーを作成しました。

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?');
    }
}
于 2012-06-21T14:43:55.817 に答える