auto returning a post value

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
stagehand
Forum Newbie
Posts: 1
Joined: Fri Sep 28, 2007 11:54 pm

auto returning a post value

Post by stagehand »

I am working on a payment processing application. My app will send the information to the payment server and in return I will get an approved or declined response. Since I am fairly early in the development process I would like to be able to test my code without actually sending a post to a real payment processor.

What I have be trying to figure out is, can I post my form to another php file and have that file automatically post back either a good or bad status code in the form of a post? Could I use the header function to accomplish this goal? The response I receive back needs to be in the form of a post variable.

Thanks
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

Man, I know there is a good way of doing this. I'm just drawing a blank.

My hack of a solution would be to put it in a form, and have javascript submit the form on page load. =/
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
jeffery
Forum Contributor
Posts: 105
Joined: Mon Apr 03, 2006 3:13 am
Location: Melbourne, Australia
Contact:

Re: auto returning a post value

Post by jeffery »

stagehand wrote:I am working on a payment processing application. My app will send the information to the payment server and in return I will get an approved or declined response. Since I am fairly early in the development process I would like to be able to test my code without actually sending a post to a real payment processor.

What I have be trying to figure out is, can I post my form to another php file and have that file automatically post back either a good or bad status code in the form of a post? Could I use the header function to accomplish this goal? The response I receive back needs to be in the form of a post variable.

Thanks
Most Payment Gateways provide a test account or test numbers for development purposes. Ask you payment gateway provider for the information.
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

use curl

Post by yacahuma »

depending on how the gateway works you will use a normal post or curl.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Indeed, cURL is what you are after.
Post Reply