java - Conversation scoped and jsf redirect -


is possible maintaining conversation during redirect external url? started paypal transaction cdi conversation bean , next there faces redirect paypal page when log in , doing payment , next paypal returning page , want have same instance of backing bean remember details sent paypal.

when paypal redirects page, appends url transaction token , payer id don't have information quantity of products user bought. want remember quantity before redirect. now, after paypal returns site call method doexpresscheckout , want pass quantity , other transaction details because can set entirely different details before transaction , there possible strange situation when customer accept on paypal page buying products 10$, set 100$ after paypal redirects again page , customer have no idea how paid. don't know why happens.

i use soap api.

yes, can resume conversation external redirect. include cid=nnn in return url pass paypal. example:

returnurl = "http://myip/myapp/return.seam?cid=" + conversation.instance().getid(); details.setreturnurl(returnurl); ... 

as 2 minute default conversation timeout rather limited, want increase conversation timeout before placing call paypal:

conversation.instance().settimeout(900000); // 15 minutes 

however, doing not idea keeps data around potentially long time, , need keep session cookie scheme work (so must increase session timeout if necessary).

a better strategy keep transaction data persistently (db or disk), associate randomly generated id data , retrieve on return paypal. way don't need keep conversation in memory.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -