how do i store some value to use after redirected from Payment gateway |
i want to store some value to use later when the page is being redirected back from payment gateway.
for ex. i want customer name, address later after the payment is successful. i have tried using session for that but the session value got destroyed after redicted from another domain or server. i am new to this so please explain properly. i am using Codeigniter 4.
not sure but when i integrated paypay they had a " if successful post payment url" you could set yourself and there was the means to get info. So it was only a matter of extracting that info , putting in a database, before the client sees something .like "payment successful" .
Or save the info in an encrypted cookie.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(10-12-2023, 09:25 PM)InsiteFX Wrote: Or save the info in an encrypted cookie. can you please explain how can I use an encrypted cookie? I tried using cookie but it is not working. PHP Code: helper('cookie'); PHP Code: public function testing(){
Set a secure PHP cookie for an encrypted connection
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
@anuragk Never use exit().
@InsiteFX The cookie is not encrypted, but for an encrypted connection (HTTPS).
Right, but he would need to encrypted the cookie data then store it in the cookie.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
ok but first it needs to work, set_cookie is not working is CI4
and using the mentioned way is not working for storing the cookie PHP Code: helper('cookie'); PHP Code: public function testing(){ The above code does not give me any output, it only prints page is working, not the cookie value whereas the conventional PHP way of using cookie is working fine. I tried PHP Code: setcookie('name', 'this is cookie'); PHP Code: echo $COOKIE['name']; this code worked. |
Welcome Guest, Not a member yet? Register Sign In |