Is there a way to link flash to Paypal? Does anyone have any experience with this. Anything would help! Thanks.
www.enjoychess.com
ANDY
Printable View
Is there a way to link flash to Paypal? Does anyone have any experience with this. Anything would help! Thanks.
www.enjoychess.com
ANDY
that's awesome
how is that done?
massive amounts of variables, loadvars, and if statments....
I can guide you along the way but there is alot to know to just start out....
Ask away and I will help.
Basically the text fields are looked at by a loop that check if they are full if they are, then it sends another loop to send variables to pay pal in the use of a newLoadVars, and arrays.
Pretty crazy stuff
the if statments make it so when you add a new product, it checks to see what the last line full is then add the product to the line underneath.
get good with loops to start
code:
for(i=0 ; i<10 ; i++){
trace("I am at number"+i);
}
what this does it set i to 1
then, while the second part =true, so every frame i<=0 it will loop
then, add one to i every frame
basically this will loop ten times, because of the i<=10 :)
then it will trace in the output window, the phrase I am at number, then will input what ever number you are at because i is equal to the number of the times it has looped....so your output window would look like
I am at number 1
I am at number 2
I am at number 3
I am at number 4
I am at number 5
I am at number 6
I am at number 7
I am at number 8
I am at number 9
I am at number 10
because every time it loops over it send I am number then what ever number it is on.
That is the fundamental of the shopping cart
What is the datastream you are sending to paypal?
data stream?
you mean the newLoadVars?
NRD, can you post your example again?
I found this from flash exchange
http://www.webassist.com/Products/Pr...ils.asp?PID=24
got to mrermadebaubles.com to see how I use this in my catalog
no action script needed
just set the snap to snap to object
and snap the object to a button the go to the propties
and put in all the needed info
thats it.
These look like cheesy methods. Having a website shopping cart would look better.
Don't you think? Especially if your selling more then one product?
Sorry for interrupting, but is it secure to do online payments through flash?
that's a good question.
all the link duz it bring you to paypal with some info about the price, product id and the email needed to get payment, there is a shoping cart, but i dont us that. I use the buy it now button . paypal has a incript button you can use from thier site but I dont know how to get it to work with flash.
realy this way is only good for goods and not services
It would be nice to have a flash shopping cart for multiple items for sale then a paypal button to send final total to them. Paypal will be the secure part where the customer filles out name, credit card and etc.
thats how it works, you just said itQuote:
Originally Posted by keith30
but the shoping cart part in on the paypal site, but there is a way to set it up on your site that way too.
does this mean that to able to use paypal in ur website u can't (technically, forget the security part) write a flash application that is totally independent from the button (or the encrypted stuff) paypal provide?
i sell goods not services so I dont have a need for encrypted buttons.
the buttons I use bring them to pay pal witch is a encrypted site.
Not specifically, I never built a web site with paypal, so in general, to able to use paypal in ur website u can't write a flash application that is totally independent from the button (or the encrypted stuff) paypal provide?Quote:
Originally Posted by joshchernoff
WOW that was a long time ago...
Here check this out.....
www.879rr.com
goto "FunkTone" That is the basic version... didnt get paid a whole lot to customize it out.....
But you get the idea....
Hit the check out button to see how ti communicated to paypal.
Dont worry you wont be charged.
Unless you want to :)
I looked at your site, "879" and the shopping cart that you constructed is exactly what I need with PayPal. Do you have a tutorial or the coding that you used? I would love to take a look at it.
Thanks!
Sincerely,
Furpants
Paypal has documentation on how to do this: https://www.paypal.com/us/cgi-bin/we...howto_checkout (you need to be signed in to see it)
I'm currently building a Flash-only shopping cart. After reading that Paypal documentation and a few forums, I had it working within 1.5 hrs. I don't have the actual code on me right now, but I can post it when I get home. Basically, the app must run in a browser (I couldn't get a Projector to work, it has to do with the way it sends variables). All the information for the cart is stored internally within Flash until they hit Purchase. It uses a LoadVars object to submit the necessary info to Paypal and a new window is opened. The only information it sends is the items, quantities, and prices for each item (using POST... the user won't see it). The actual transaction is done through the Paypal site, so you don't even have to worry about the security part of it.
I would love that. If I can view the coding, it would be much easier for me to figure out how it all works. This site is a good example of what I'm trying to achieve: http://www.dish-designs.com/home.htm
Thanks!
Furpants
Okay, here's the function I have. Bear in mind that this is being handled the way I'm storing records internally within Flash; you'll very likely have to loop through your cart differently.
Basically, item_name_X, quantity_X, and amount_X are the important things for each item. X must start at 1 and increase sequentially.Code:function checkout() {
checkMC = new LoadVars();
checkMC.rand = random(99999);
checkMC.cmd = "_cart";
checkMC.upload = "1";
checkMC.business = "[email protected]";
checkMC.currency_code = "USD";
checkMC.amount = total.text.substr(1, total.text.length-1); //amount in decimal (eg 32.45)
for (var i = 0; i<cartRef.records.length; i++) {
var num = i+1;
checkMC["item_name_"+num] = cartRef.records[ i].part; // part name
checkMC["quantity_"+num] = cartRef.records[ i].quantity; // part quantity
checkMC["amount_"+num] = cartRef.records[ i].price; // part price
checkMC["on0_"+num] = "Unit price: $"+cartRef.records[ i].price; // optional field 1
checkMC["on1_"+num] = "Count: "+cartRef.records[ i].count; // optional field 2
}
checkMC.send("https://www.paypal.com/cgi-bin/webscr", "_blank", "POST");
}
Just what I needed~
First off, thank you marshdabeachy, I've been looking for this code for days. Also, I love your site. Very nice.
My problem is in using that code on the site I'm currently building for myself. I only have two items to sell so I just list all the variables to send instead of using the for loop. The proplem is that when the quantity variable for either item is equal to zero, paypal gets cranky and gives a page that says the shopping cart is empty. Here's my site, very much still being created... http://www.nicholaskoby.com
and here's the code I use on my checkout button...
on (release) {
payPal = new LoadVars();
payPal.rand = random(99999);
payPal.cmd = "_cart";
payPal.business = "[email protected]";
payPal.currency_code = "USD";
payPal.upload = "1";
payPal.amount = (orderform.grandTotal + ".00");
payPal.item_name_1 = "Caffeinated";
payPal.quantity_1 = orderform.quantity1;
payPal.amount_1 = "13.00";
payPal.item_number_1 = "DR-001";
payPal.item_name_2 = "Dirty Martini";
payPal.quantity_2 = orderform.quantity2;
payPal.amount_2 = "15.00";
payPal.item_number_2 = "DR-002";
payPal.send("https://www.paypal.com/cgi-bin/webscr", "_blank", "POST");
cart.gotoAndPlay("checkout");
}
Please help! Any ideas?
forgot to add email notification... that's better.
Just disregard the record if the quantity is set to 0. For example...
Of course, if the first item has a quantity set to 0, then it will skip record 1. I'm not sure how Paypal will react if don't provide the records in order. In case it gets cranky, you'll have to add an iterator that will keep things in order...Code:if (orderform.quantity1 > 0) {
payPal.item_name_1 = "Caffeinated";
payPal.quantity_1 = orderform.quantity1;
payPal.amount_1 = "13.00";
payPal.item_number_1 = "DR-001";
}
Do that same type of thing for the other one, should work just fine. :)Code:var iter = 1;
if (orderform.quantity1 > 0) {
payPal["item_name_"+iter] = "Caffeinated";
payPal["quantity_"+iter] = orderform.quantity1;
payPal["amount_"+iter] = "13.00";
payPal["item_number_"+iter] = "DR-001";
iter++;
}
Bloody brilliant! You just saved me many many frustrated hours. I still had some issues until I realized exactly what the iter variable is for, and deleted the line where I reset it between items.
Thanks!
Marshdabeachy, could I ask just one more question of you? The Background Selector experiment on your web site... I've been trying to do something similar with mouseover buttons and a slidding menu for an mp3 player on my site. Having a very hard time figuring it out, the cool physics-like slidding I mean. Don't suppose you could point me to any tutorials or even concepts used to get me going in the right direction?
Hi guys,
I am using the variables as set above to use a simple buy now button. The only issue I am having is with the return url
I have it set as payPal.return =
"http://www.mysite.co.uk/payment-successful.php";
It works fine for the cancel one where the code is =
payPal.cancel_return = "http://www.mysite.co.uk/error.php";
It is an issue to do with the return variable but that is set by Pay Pal.
Any ideas?
Cheers,
Neil
Sorry to drudge up such an OLD thread..but there isnt much here besides this one.
post# 24:
can I ask if the "amount" var
code:
payPal.amount = (orderform.grandTotal + ".00");
is needed when you are passing in the individual amount per item like that??
trying to get mine working...but want to hardcode some stuff to test..then work on looping through.
Thanks
also how would be the best way to "loop" through these cart values?
I see the above loop example..but Im not sure where hes getting his values from or how they are formatted.
would I make some sort of internal ARRAY?
cartTotalItems = ""; //increment x by 1's each add to cart (to get totalProds)
cartTotalPrice=""; //sum of ALL product prices.
cartItemNames = [];
cartQuantity=[];
etc..etc..
having alittle trouble getting my head around the logic here.. Im not great with loops yet...but Im sure I can loop through an array to pull my data...
I guess Im having trouble setting up my data to get to that point..
suggestions?...
thanks
chec out http://anyrd.anyorganization.com/home.html
great price, and it works pretty well
Thanks...but I dont want to "BUY" anything...(theres really no need)...
I can just send everything in a _POST method varObject.
(hence my questions)... but thanks. :)
now im making a website selling t shirts and i want to have radio buttons,to click the shirt size and then use paypal to pay how could i pull this off? im not too grand at actionscript so any help is amazing, thanks in advance
I am actually rescripting my cart to be free standing, and it will be released as open source when it is done.
I can help ya with the radio buttons also.
Are you making a Flash Cart?
Quote:
Originally Posted by N_R_D
Quote:
Originally Posted by N_R_D
N_R_D -
what do you mean by 'free standing'??
also...
you would use radio buttons...the same you would anything else, on click of the radioButton it just sets the SAME variable to have a different value.
I coudl show you a "crude" demo, using comboBoxes.
has a 'store' of shirts to pick from (all loaded/populated through XML)
you can 'buy' as many shirts as you want and it adds it to your 'cart'...you can delete products from the cart before final check out...
since this was only a DEMO for testing...when you actually add a product to the cart the cart is right on top of the 'shopping' page... I didnt make it a seperate section...so its kind of ugly ... but functional.
Yeah I made a fully functional flash cart to use with paypal.....
ala
http://www.dp-labs.com/clients/fu/solidreality/
but I put som much stuff in it to make it work with that site that it is dependant of it.
I am working on converting it over so that it will be drop and play component style.
please explain me the whole working of online payement and whats is the minimum requrement of information need to send to paypal to know from which site or user the request has come from. and how the merchant gets his/her payment. plz give me information about this as handling data in flash is not a problem for me but the next thing to do after knowing what user wants to purchase and and its cost information how to pass this information to paypal to accept the payement and notify us that the payment has been made by the purchaser and the goods or services need to be render now
Did you read the thread?? Or check out any of the links here? you will have to go to PayPal site..(link is posted here already) on how to format and what vars to use to pass the data to PayPal....
https://www.paypal.com/us/cgi-bin/we...howto_checkout
must be logged in to view it.
whispers im interested in the crude demo of yours