1

django-paypal の DCramer フォークを使用しています: https://github.com/dcramer/django-paypal

IPN規格を使用しています

私がやりたいことは、IPN から支払人 (顧客) の住所を取得することです。Paypal ドキュメントから、この情報は IPN と共に送信され、django-paypal を調べると、このデータを保存するためのフィールドがデータベースにあることがわかります。ただし、このデータは django-paypal が提供する paypal_ipn モデルには保存されていません。信号の ipn_obj も調べましたが、このデータのすべてのフィールドも空白です。

どうすれば支払人の住所を取得できるのか、誰かに光を当てることはできますか?

それが役立つ場合は、例の信号を使用しています:

    #Paypal signals
    from paypal.standard.ipn.signals import payment_was_successful
    import datetime

    #Signal for paypal confirmation
    def show_me_the_money(sender, **kwargs):
        ipn_obj = sender

        # Undertake some action depending upon `ipn_obj`.

    payment_was_successful.connect(show_me_the_money)

編集:

以下の scytale によって提案された ipn_obj のダンプは、関連するフィールドに対してこれを生成します。

    address_city\t(<type 'unicode'>)\t: 
    address_country\t(<type 'unicode'>)\t: 
    address_country_code\t(<type 'unicode'>)\t: 
    address_name\t(<type 'unicode'>)\t: 
    address_state\t(<type 'unicode'>)\t: 
    address_status\t(<type 'unicode'>)\t: 
    address_street\t(<type 'unicode'>)\t: 
    address_zip\t(<type 'unicode'>)\t:

他にもたくさんのフィールドがあります。それらのデータが必要な場合はお知らせください。ここに貼り付けます。

4

1 に答える 1