I try to avoid using the session id when integrating with other
systems, instead I use a model id and calculated hash, and then in the
controller that receives the notification verify that the hash is
valid and use the id to find the model.
for instance, if the user id is 123 then I go something like
$id=123;
$hash=$id."/".sha1($id.$very_secret_key);
and use the hash value that contains the id as a parameter
it's common for apis to accept callback urls, so it's just a matter of
preparing a url pointing to your controllers action:
function callback_action($id,$hash){
$new_hash=$id."/".sha1($id.$very_secret_key);
if ($hash==$new_hash){
//get data and use it ....
Regards
On 19 ene, 03:31, Tran Cao Thai <[email protected]> wrote:
> I found the way to go around the problem by setting auto return from paypal
> site. But this session tracking problem still gets my curiosity so far.
>
> @criket: yes, i know the session id of the user returned from the paypal.
> However, what i need to do next is searching the user from the server based
> on that session_id and interact with that particular user (like show message
> and ask user to navigate to the account page... )
>
> On Wed, Jan 19, 2011 at 1:09 PM, cricket <[email protected]> wrote:
> > On Tue, Jan 18, 2011 at 12:36 AM, Tran Cao Thai
> > <[email protected]> wrote:
> > > Hi cakers,
>
> > > I have been developed a Paypal payment system recently. When user
> > > finish the payment, paypal will return the ipn to the system (which
> > > include the session id of the user). My question is how can i find out
> > > the user from the server based on his session id in order to empty his
> > > shopping cart ?
>
> > Do you mean paypal's session, or yours? Are you submitting the session
> > id as a "passthru" variable?
>
> > <input type="hidden" name="rvar_session_id" value="<?=
> > $Session->read('sessID') ?>" />
>
> > In your controller, you should receive it back from PP as
> > $this->params['form']['rvar_session_id']
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > [email protected]<cake-php%[email protected]>For
> > more options, visit this group at
> >http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php