This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Webmaster forum > August 2006 > Transferring Paypal Payment Notification to Flash.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Transferring Paypal Payment Notification to Flash.
doorman

2006-08-02, 11:39 am

Hello,

I am intending to use a buy now Paypal button in my Flash 5 website. I
know that paypal can send an Instant Payment Notification (IPN) to my
web site regarding whether the payment was made or not. I am trying to
figure out how shall I transfer this information to the Flash 5. movie.
Do I need to to post specific html commands/script in the html part of
the page such as variables that can recieve values from the paypal page
and then use Loadvariablesnum command in the flash movie in order to
grab those values to the flash movie? I am defintely not interested in
using javascript for communicating the notification if possible. I am
not sure that I am on the right track though, and I have no exerience
with html variables, Loadvariablesnum command nor paypal. If it is
possible to illuminate your answer with a small live code example it
will definitley help me.

Thanks.

Arnie.

Brian Wakem

2006-08-02, 11:39 am

doorman wrote:

> Hello,
>
> I am intending to use a buy now Paypal button in my Flash 5 website. I
> know that paypal can send an Instant Payment Notification (IPN) to my
> web site regarding whether the payment was made or not. I am trying to
> figure out how shall I transfer this information to the Flash 5. movie.
> Do I need to to post specific html commands/script in the html part of
> the page such as variables that can recieve values from the paypal page
> and then use Loadvariablesnum command in the flash movie in order to
> grab those values to the flash movie? I am defintely not interested in
> using javascript for communicating the notification if possible. I am
> not sure that I am on the right track though, and I have no exerience
> with html variables, Loadvariablesnum command nor paypal. If it is
> possible to illuminate your answer with a small live code example it
> will definitley help me.



Do you really think it is wise to depend on flash for this? You wont be
able to sell anything to me, or anyone else who has flash disabled or not
installed.

Could you imagine Tesco refusing to serving people wearing hats?


--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
MGW

2006-08-02, 11:39 am

On Sun, 30 Jul 2006 21:25:14 +0100, Brian Wakem <no@email.com>
scrawled:

>
> Do you really think it is wise to depend on flash for this? You wont be
> able to sell anything to me, or anyone else who has flash disabled or not
> installed.
>
> Could you imagine Tesco refusing to serving people wearing hats?


Only if they're tin foil hats ;-)

--
MGW (Note: my Hotmail address is seldom checked)
Hofstadter's Law: It always takes longer than you expect, even
when you take into account Hofstadter's Law. - Douglas Hofstadter
Mark Goodge

2006-08-02, 11:39 am

On 30 Jul 2006 13:20:02 -0700, doorman put finger to keyboard and
typed:

>Hello,
>
>I am intending to use a buy now Paypal button in my Flash 5 website. I
>know that paypal can send an Instant Payment Notification (IPN) to my
>web site regarding whether the payment was made or not. I am trying to
>figure out how shall I transfer this information to the Flash 5. movie.
>Do I need to to post specific html commands/script in the html part of
>the page such as variables that can recieve values from the paypal page
>and then use Loadvariablesnum command in the flash movie in order to
>grab those values to the flash movie? I am defintely not interested in
>using javascript for communicating the notification if possible. I am
>not sure that I am on the right track though, and I have no exerience
>with html variables, Loadvariablesnum command nor paypal. If it is
>possible to illuminate your answer with a small live code example it
>will definitley help me.


The Paypal callback doesn't go to the page that contains the payment
button. Or, at least, that's not how it's intended to work. The
callback goes to a separate page that accepts the Paypal callback and
then confirms back to Paypal that it has received it. The way it works
is that Paypal's server sends a POST request to a URL of your choice,
and then expects a corresponding GET request back again to confirm the
handshake. So the callback page on your site has to be written in a
scripting language (such as PHP, PERL or ASP) which is capable of
accepting POST variables and acting on them to generate a one-time GET
request out again.

The point of a callback script isn't primarily to generate
user-visible information (although it can trigger that), it's to let
your website know that a payment has been made so that you can then
process the transaction which has been paid for - for example,
confirming to a shopping cart program that payment has been made so
that the cart status is updated, or generating a download link for
electronic sales.

Mark
--
Visit: http://www.MineOfUseless.info - everything you never needed to know!
Auggie

2006-08-02, 11:39 am


"doorman" <ofthe7thwave@yahoo.com> wrote in message
news:1154290802.182129.98430@h48g2000cwc.googlegroups.com...
> Hello,
>
> I am intending to use a buy now Paypal button in my Flash 5 website. I
> know that paypal can send an Instant Payment Notification (IPN) to my
> web site regarding whether the payment was made or not. I am trying to
> figure out how shall I transfer this information to the Flash 5. movie.
> Do I need to to post specific html commands/script in the html part of
> the page such as variables that can recieve values from the paypal page
> and then use Loadvariablesnum command in the flash movie in order to
> grab those values to the flash movie? I am defintely not interested in
> using javascript for communicating the notification if possible. I am
> not sure that I am on the right track though, and I have no exerience
> with html variables, Loadvariablesnum command nor paypal. If it is
> possible to illuminate your answer with a small live code example it
> will definitley help me.


First, the customer buying an item off your website and the PayPal IPN are
two completely different procedures. DO NOT think of them as linked in any
way.

The only thing that relates these two actions to eachother is your server...
otherwise each is independant of the other.

This is what you want to happen:

Customer goes to BUYNOW.asp and makes purchase.
If payment ok send customer to THANKYOU.asp.
If payment bad ask customer to re-enter info or choose alternate payment
method.

Here is what happens behind the scenes:

Customer goes to BUYNOW.asp and makes purchase.
BUYNOW.asp sends information to PayPal IPN
BUYNOW.asp sends customers to THANKYOU.ASP
PayPal IPN processes customer purchase and sends information back to your
website at ORDERPROCESS.asp

The point of that is: the customer is on "thankyou.asp" but the IPN info is
sent to "orderprocess.asp"

To have the two interract what you want to do is:

1) Customer makes purchase on BUYNOW page.
2) BUYNOW page sends information to PayPal via IPN
3) BUYNOW makes the database entries for the order, etc.
4) BUYNOW sends customer to THANKYOU page
5) THANKYOU page waits.....
6) PayPal IPN sends information on purchase back to ORDERPROCESS page.
7) THANKYOU page still waiting....
8) Your ORDERPROCESS page handshakes the information back to PayPal
9) THANKYOU page still waiting...
10) PayPal IPN sends final confirmation to ORDERPROCESS page
11) ORDERPROCESS page writes the result to the database
12) THANKYOU page has been waiting for new entry to database and sees one
finally made (by #11 above)
13) THANKYOU page processes new database entry. If payment OK then display
thankyou message, send confirmation emails, etc. If payment was BAD then
send customer back to #1 above with an error message relating to why payment
didn't go through.


Charles Sweeney

2006-08-02, 11:39 am

doorman wrote

> Hello,
>
> I am intending to use a buy now Paypal button in my Flash 5 website. I
> know that paypal can send an Instant Payment Notification (IPN) to my
> web site regarding whether the payment was made or not. I am trying to
> figure out how shall I transfer this information to the Flash 5.

movie.
> Do I need to to post specific html commands/script in the html part of
> the page such as variables that can recieve values from the paypal

page
> and then use Loadvariablesnum command in the flash movie in order to
> grab those values to the flash movie? I am defintely not interested in
> using javascript for communicating the notification if possible. I am
> not sure that I am on the right track though, and I have no exerience
> with html variables, Loadvariablesnum command nor paypal. If it is
> possible to illuminate your answer with a small live code example it
> will definitley help me.
>
> Thanks.
>
> Arnie.


Good luck.

--
Charles Sweeney
http://CharlesSweeney.com
Charles Sweeney

2006-08-02, 11:39 am

Brian Wakem wrote

> Could you imagine Tesco refusing to serving people wearing hats?


Truth is stranger than fiction. Some shopping-centres ban people who wear
hoods.

--
Charles Sweeney
http://CharlesSweeney.com
Charles Sweeney

2006-08-02, 11:39 am

Mark Goodge wrote

> The Paypal callback doesn't go to the page that contains the payment
> button. Or, at least, that's not how it's intended to work. The
> callback goes to a separate page that accepts the Paypal callback and
> then confirms back to Paypal that it has received it. The way it works
> is that Paypal's server sends a POST request to a URL of your choice,
> and then expects a corresponding GET request back again to confirm the
> handshake. So the callback page on your site has to be written in a
> scripting language (such as PHP, PERL or ASP) which is capable of
> accepting POST variables and acting on them to generate a one-time GET
> request out again.


It's a POST request it sends back.

Just been working on an IPN script for one of my sites. It does its stuff
then makes a post to a script on another site of mine. In this case it's a
bit of a work-around due to the hassle of having different PayPal accounts
for different sites, so I am sharing an IPN script on one site with
another.

--
Charles Sweeney
http://CharlesSweeney.com
doorman

2006-08-02, 11:39 am

Thanks for the reslponse, Do I HAVE to install a special server side
script in the page or html / JavaScript code is enough (Dont know
anything about server side scripts) Will my flash file be able to grab
the response using LoadVariablesnum command or a similar command?
Thanks.
Mark Goodge wrote:
> On 30 Jul 2006 13:20:02 -0700, doorman put finger to keyboard and
> typed:
>
>
> The Paypal callback doesn't go to the page that contains the payment
> button. Or, at least, that's not how it's intended to work. The
> callback goes to a separate page that accepts the Paypal callback and
> then confirms back to Paypal that it has received it. The way it works
> is that Paypal's server sends a POST request to a URL of your choice,
> and then expects a corresponding GET request back again to confirm the
> handshake. So the callback page on your site has to be written in a
> scripting language (such as PHP, PERL or ASP) which is capable of
> accepting POST variables and acting on them to generate a one-time GET
> request out again.
>
> The point of a callback script isn't primarily to generate
> user-visible information (although it can trigger that), it's to let
> your website know that a payment has been made so that you can then
> process the transaction which has been paid for - for example,
> confirming to a shopping cart program that payment has been made so
> that the cart status is updated, or generating a download link for
> electronic sales.
>
> Mark
> --
> Visit: http://www.MineOfUseless.info - everything you never needed to know!


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews