c# - Detecting paypal subscription cancel on login asp.net -


i building asp.net web app involves paypal subscriptions. need check if user has cancelled on login possible , if how? have seen other posts on subject situation different since i'll checking on login. thinking maybe can batch dump of data paypal nightly , check against set flag on users cancelled. not sure best way is..

if want check whether user has accepted or cancelled agreement after logging paypal yes can check using express checkout token . need call getexpresscheckoutdetails api on token after buyer log in paypal account , variable billingagreementacceptedstatus in response .

billingagreementacceptedstatus=0 means buyer has not accepted agreement or clicked on cancel after logging paypal account .

billingagreementacceptedstatus=1 , means has clicked on "agree , continue" after logging paypal .

i have included sample response .

for rejection after log in :

nvp response: token=ec-0rc04801ku663840m **billingagreementacceptedstatus=0** checkoutstatus=paymentactionnotinitiated timestamp=2014-09-14t14:54:43z correlationid=5cc68231a1b35 ack=success version=109.0 build=12786467 email=xxxxxxxxxxxxxx payerid=xxxxxxxxxxxx payerstatus=verified firstname=eshan personal test lastname=account countrycode=us currencycode=usd amt=0.00 shippingamt=0.00 handlingamt=0.00 taxamt=0.00 insuranceamt=0.00 shipdiscamt=0.00 paymentrequest_0_currencycode=usd paymentrequest_0_amt=0.00 paymentrequest_0_shippingamt=0.00 paymentrequest_0_handlingamt=0.00 paymentrequest_0_taxamt=0.00 paymentrequest_0_insuranceamt=0.00 paymentrequest_0_shipdiscamt=0.00 paymentrequest_0_insuranceoptionoffered=false paymentrequest_0_addressnormalizationstatus=none paymentrequestinfo_0_errorcode=0  

for acceptance after log in :

nvp response: token=ec-1ex65013s71914041 phonenum=408-767-7151 **billingagreementacceptedstatus=1** checkoutstatus=paymentactionnotinitiated timestamp=2014-09-14t14:56:24z correlationid=aae4de7a4b356 ack=success version=109.0 build=xxxxxxxxxxxxx payerid=xxxxxxxxxxxxxx payerstatus=verified firstname=eshan personal test lastname=account countrycode=us shiptoname=eshan personal test account shiptostreet=cxas shiptostreet2=asa shiptocity=fl shiptostate=fl shiptozip=95616 shiptocountrycode=us shiptocountryname=united states addressstatus=confirmed currencycode=usd amt=0.00 shippingamt=0.00 handlingamt=0.00 taxamt=0.00 insuranceamt=0.00 shipdiscamt=0.00 paymentrequest_0_currencycode=usd paymentrequest_0_amt=0.00 paymentrequest_0_shippingamt=0.00 paymentrequest_0_handlingamt=0.00 paymentrequest_0_taxamt=0.00 paymentrequest_0_insuranceamt=0.00 paymentrequest_0_shipdiscamt=0.00 paymentrequest_0_insuranceoptionoffered=false paymentrequest_0_shiptoname=eshan personal test account paymentrequest_0_shiptostreet=cxas paymentrequest_0_shiptostreet2=asa paymentrequest_0_shiptocity=fl paymentrequest_0_shiptostate=fl paymentrequest_0_shiptozip=95616 paymentrequest_0_shiptocountrycode=us paymentrequest_0_shiptocountryname=united states paymentrequest_0_addressstatus=confirmed paymentrequest_0_addressnormalizationstatus=none paymentrequestinfo_0_errorcode=0  

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -