I work with the PayPals API, which is really poorly documented and you need to ask for help.
I am expanding my site with the Adaptive PayPal API, which allows me to pre-configure pre-approved payments.
Along with the details I sent, I would like to add some user information.
It seems that this can be done according to their documentation, but nowhere in the IPN will it be 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()
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¬ify_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 answer do I see customerType or customerId
Any ideas?
ApPeL source share