rclayh
|
| Posted: 05/09/2003, 8:48 PM |
|
Has anyone developed a working PayPal cart that passes the aggregate amount to PayPal (including the list of items)? Would you be interested in sharing? If not anybody else interested in working on one?
Clay
|
|
|
 |
Steven
|
| Posted: 05/10/2003, 1:30 AM |
|
I have tried this and failed
I managed to pass single items, as i know other people have.
but where i failed is with a listing of items all being passed at a single time
the problem i found and could not figure was the numbering system of the items
the paypal system requires that the numbers ber consecutive
item_1
item_2
item_3
no matter what the item_id numbers are in the database
the items that are in the shopping basket have to be renumbered with a consecutive numbering system, befor they are passed to the paypal checkout.
this is where i failed, i was passing the shopping basket to the paypal checkout in its correct state, which meant that if someone had ordered
Item_id 99
item_id 04
item_id 22
these went to paypal as that item_id number. and always the paypal checkout rejected the shopping basket except for the first item, for it doesnt matter if the first item number it gets is item_99 as long as the following one is item_100 and all following numbers are consecutive to the first.
anyway, i tried for a week to get it to work for multiple items to be added at a single time, I traced all codecharge users shops who said they had done it, and I requested of Yes software if they had an example project file, But all to no result.
I found it amazing that considering there are so many 'great' coders, using CCS that no one answered my request either on here or the newsgroups.
and I still find it amazing that no one seems to have a working example of the paypal checkout , which passes multiple items.
if you have any better luck than me in the this quest of yours, could you please consider email me how you did it, because i still didnt solve an easy way to transfer the checkout system into paypal.
steven.dowd@dowd.co.uk
|
|
|
 |
RonB
|
| Posted: 05/10/2003, 7:02 AM |
|
I know what you mean. I tried to do the same thing but it seems PayPal want items to get in the basket one at a time. I eventualy opted to total the order, use the order number as item Id and use ccs to email the order list seperately. So the paypal receit just lists the ordernumber and the total amount for that order number and the client get's a specification by email.
Now..., there is a way of doing what you want.. instead of linking to your shopping cart you could link directly to paypal so when a customer buys an item it will go into the paypal shoppingcart. If you use the event system to insert the item just before going to paypal you have what you want.
So clicking on the add to cart button first inserts the order into your database then directly links to paypal.
I decided not to use this solution because I want the customer to go to paypal only once.
The problem with the solution is that when a customer decides he doesn't want one of the items and removes it from the paypal cart there is no way to delete the same item from your database because there is no way to track what happens in the paypal cart..
Ron
|
|
|
 |
Steven
|
| Posted: 05/10/2003, 8:59 AM |
|
yes, i have yet to see anyone produce a CC or CCS project which adds individual items into paypal , all at a single time, all the shops i have found built with CC or CCS have opted for the total to be transfered to paypal as a single amount, and i suppose a seperate email of the order contents, but I do not like this as an option.
I know what you mean about adding items individually, what i didnt like was the fact that the popup paypal windows might confuse people into thinking they could only order a single item.
personally i had not thought about the problem it would cause if an item was updated or deleted from the popup paypal window, it would be out of sync then with the order value on the website, as you figured this would be impossible to sort.
I had hoped that someone at Yes Software would figure that if they put a few hours aside to make a few default , shop checkout systems, as per the book store one, but for the other systems like paypal, then maybe the investment would be returned through extra sales of CC & CCS, after all, offering these interface pages as examples would be more arrows for the CC Bow.
Steven Dowd
|
|
|
 |
DeWebDude
|
| Posted: 05/14/2003, 7:02 PM |
|
I agree....
You should submit your problem, code and all along with a good description to codecharge support, and have them help you figure it out.
Sometimes they run you around and don't give a good answer, keep asking until you get what you want.
PS Remember to share the results!
|
|
|
 |
mrfree
|
| Posted: 05/14/2003, 8:44 PM |
|
Try This!
Dim payment_url
Dim urlv(26)
Dim i
Dim state_name
If customers.pay_type.value = 3 Then
urlv(0) = "https://www.paypal.com/cgi-bin/webscr"
urlv(1) = "cmd=_ext-enter"
urlv(2) = "redirect_cmd=_xclick"
urlv(3) = "business=sales@you.com"
urlv(4) = "undefined_quantity=1"
urlv(5) = "item_name=cart_name"
urlv(6) = "item_number=" + CStr(last_order_id)
urlv(7) = "amount=" + CStr(OrderTotal)
urlv(8) = "shipping=" + CStr(ship_cost)
urlv(9) = "shipping2="
urlv(10) = "email=" + customers.email.value
urlv(11) = "first_name=" + customers.first_name.value
urlv(12) = "last_name=" + customers.last_name.value
urlv(13) = "address1=" + customers.address1.value
urlv(14) = "address2=" + customers.address2.value
urlv(15) = "city=" + customers.city.value
urlv(16) = "state=" + state_name
urlv(17) = "zip=" + customers.zip.value
urlv(18) = "night_phone_a=" + customers.night_phone_a.value
urlv(19) = "night_phone_b=" + customers.night_phone_b.value
urlv(20) = "night_phone_c=" + customers.night_phone_c.value
urlv(21) = "day_phone_a=" + customers.day_phone_a.value
urlv(22) = "day_phone_b=" + customers.day_phone_b.value
urlv(23) = "day_phone_c=" + customers.day_phone_c.value
urlv(24) = "return=http://www.yourdomain.com/paymentrec.asp"
urlv(25) = "cancel_return=http://www.yourdomain.com/paymentcan.asp"
urlv(26) = "submit=Submit"
payment_url = urlv(0) + "?"
For i = 1 To 25
payment_url = payment_url + urlv(i) + "&"
Next
payment_url = payment_url + urlv(26)
Response.Redirect payment_url
End If
|
|
|
 |
|