Is using the PayPal IPN as a API trigger a good implementation? -
as recommended paypal using combination of paypal api , ipn create 'adaptive payments' flow.
when ipn listener receives new notification paypal have 2 options (after security checks):
1) utilize received info create direct actions in website (for illustration set preapproval approved)
or instead more secure , clean way (i think):
2) observe transaction type variable (or other identifier) , request more details paypal accordingly.
for illustration if 'transaction_type' 'adaptive payment preapproval' utilize received 'preapproval_key' request preapproval details using preapprovaldetails api phone call , utilize received info of phone call set preapproval approved.
is (option 2) improve way go?
thanks.
in general there plenty info in ipn deed on, ipns pretty confusing optional fields , way there no payment_status or txn_id on subscribe events, , no subscription info on payment events, marrying them can interesting. may find easier understand if go ahead , relevant info them each ipn via api suggest.
paypal paypal-ipn paypal-adaptive-payments
No comments:
Post a Comment