Yii Framework Forum: How To Receive And Process Form Value From Other Website? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How To Receive And Process Form Value From Other Website? Rate Topic: ***** 1 Votes

#1 User is offline   mrs 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 34
  • Joined: 05-September 12
  • Location:Bangladesh

Posted 04 December 2012 - 06:23 AM

Hi,
I am facing trouble to receive and process form value which sent to my webpage using post method. When I submit my form to outside URL then its successfully passed form value but then acknowledgement form not able to passed form value to redirecting URL(my website). I have tested my redirecting URL and its working but failed to back with form value.

I think, you all have great idea about this issue. Hope will find an excellent solution soon.


With Thanks,

mrs
Explore and Enjoy Yii...
0

#2 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,511
  • Joined: 04-March 10
  • Location:UK

Posted 04 December 2012 - 06:43 AM

Can you show some example code for what you're trying to do? It wasn't clear from your description.

If you're trying to redirect a request directly, then POST data won't be preserved.

If you're trying to submit a separate request from another server, it may be getting blocked by your CSRF protection if you have this enabled.
0

#3 User is offline   mrs 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 34
  • Joined: 05-September 12
  • Location:Bangladesh

Posted 04 December 2012 - 03:29 PM

Hi,

Thanks for quick reply. The scenario is: after successful transaction then payment gateway post data to redirect URL and I want to catch all posted data and then process them on my way. I am working with Realex Payment Redirect method.

This issue arise when I am trying to solve using Yii. But without using Yii I can able to receive and process all posted data.

code format i.e.

$message = $_POST['MESSAGE'];
$authcode = $_POST['AUTHCODE'];


With Thanks,

mrs

View PostKeith, on 04 December 2012 - 06:43 AM, said:

Can you show some example code for what you're trying to do? It wasn't clear from your description.

If you're trying to redirect a request directly, then POST data won't be preserved.

If you're trying to submit a separate request from another server, it may be getting blocked by your CSRF protection if you have this enabled.

Explore and Enjoy Yii...
0

#4 User is offline   mrs 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 34
  • Joined: 05-September 12
  • Location:Bangladesh

Posted 09 December 2012 - 06:11 AM

Hi,

This issue was solved using formal PHP code. There was no problem with form submission using PHP POST method. Problem was setup redirect URL with prefix http:// . If online payment gateway provider set redirect URL with http:// in prefix then script will work nicely.

if($_POST)
 {
		$timestamp = $_POST['TIMESTAMP'];
		$result = $_POST['RESULT'];
}



I hope we will aware about that type of unwanted issue in future.

Thanks for reply.

WIth Thanks,
mrs

View Postmrs, on 04 December 2012 - 03:29 PM, said:

Hi,

Thanks for quick reply. The scenario is: after successful transaction then payment gateway post data to redirect URL and I want to catch all posted data and then process them on my way. I am working with Realex Payment Redirect method.

This issue arise when I am trying to solve using Yii. But without using Yii I can able to receive and process all posted data.

code format i.e.

$message = $_POST['MESSAGE'];
$authcode = $_POST['AUTHCODE'];


With Thanks,

mrs


Explore and Enjoy Yii...
0

#5 User is offline   dahuzizyd 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 21-June 11

Posted 10 December 2012 - 03:12 AM

I think you could use query string :
http://www.yoursite.com/yourpage.php?MESSAGE=abc&AUTHCODE=efg

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users