4

I'm working with PayPals API which is really badly documented and need to ask for some help.

I am extending my site on the PayPal Adaptive API which allows me to setup Preapproved payments before.

Along with the details sent I'd like to add some user information.

It seems like it can be done according to their documentation, but nowhere in the IPN does it get captured.

simple payment

def test_pay():
    response = paypal.pay(
        actionType = 'PAY',
        cancelUrl = cancelUrl,
        currencyCode = currencyCode,
        senderEmail = EMAIL_ACCOUNT,
        feesPayer = 'EACHRECEIVER',
        memo = 'Simple payment example',
        preapprovalKey = 'PA-0HA01893HK6322232',
        receiverList = { 'receiver': [
            { 'amount':"10.0", 'email':API_EMAIL, 'primary':True },
            { 'amount':"5.0", 'email':SECONDARY_EMAIL, 'primary':False }
        ]},
        clientDetailsType = { 'customerId': 1, 'customerType': 'Normal' },
        returnUrl = returnUrl,
        ipnNotificationUrl = notificationUrl
    )
#     if response['responseEnvelope']['ack'] == "Success":
    print response['responseEnvelope']['ack']
#     if response['paymentExecStatus'] == "COMPLETED":
    print response['paymentExecStatus']
#     if response.has_key('payKey'):
    print response['payKey']
    print response

test_pay()

The IPN response

pay_key=AP-8J7165865F7541310&transaction%5B0%5D.id_for_sender_txn=4GL2853573576212V&transaction%5B0%5D.pending_reason=NONE&charset=windows-1252&log_default_shipping_address_in_transaction=false&transaction%5B0%5D.id=6XD76450JV9737605&notify_version=UNVERSIONED&preapproval_key=PA-93P236141R834703C&transaction%5B1%5D.id=9R07347926768733A&test_ipn=1&transaction%5B0%5D.status=Completed&status=COMPLETED&action_type=PAY&memo=Simple+payment+example&transaction%5B0%5D.receiver=a.smit_1329744569_biz%40mac.com&transaction%5B1%5D.status=Completed&payment_request_date=Wed+Feb+22+05%3A30%3A49+PST+2012&transaction%5B1%5D.id_for_sender_txn=2D9633797C888500H&verify_sign=AIDiik4kxSLiNqbMmTDHplFnCnz3A3ORrDVlBVOzrtltyUx-NoxxgSc6&transaction%5B1%5D.pending_reason=NONE&transaction%5B0%5D.status_for_sender_txn=Completed&transaction%5B1%5D.status_for_sender_txn=Completed&transaction%5B0%5D.is_primary_receiver=true&transaction%5B1%5D.receiver=a.smit_1298362298_per%40mac.com&transaction%5B1%5D.amount=USD+5.00&ipn_notification_url=http%3A%2F%2F108.166.107.74%2Fyour-ipn-location%2F&transaction%5B0%5D.amount=USD+10.00&transaction_type=Adaptive+Payment+PAY&cancel_url=http%3A%2F%2F108.166.107.74%2F&reverse_all_parallel_payments_on_error=false&sender_email=a.smit_1329128659_per%40mac.com&transaction%5B1%5D.is_primary_receiver=false&fees_payer=EACHRECEIVER&return_url=http%3A%2F%2F108.166.107.74%2F

Nowhere in the response can I see the customerType or customerId

Any ideas?

ApPeL
  • 4,801
  • 9
  • 47
  • 84

1 Answers1

0

customerId and customerType aren't returned according to the PayPal API. I imagine it's a field that will show up in your transaction history on the PayPal site. Why there is no API function to return customer data is beyond me, as well.

Jule Slootbeek
  • 313
  • 2
  • 9