Reply
How to do the paypal buy-now feature
Old 07-29-2009, 09:50 PM How to do the paypal buy-now feature
Skilled Talker

Posts: 88
Trades: 0
What I am seeking
I need help with one technical issue with me setting up a paypal payment thingy.

this is where I send my customer to paypal, for paypal to then process the payment for me.


Yes I do know about
+Various P.D.F. downloads which one can get from paypal
+I have myself a button, which has the cmd= _s-xclick
+It all works except for one issue so far.

WHAT I WANT IT TO DO IS.....
*Inside my form page, I want to set the price of the product
*Send to paypal the exact amount of the payment I want to pay
*Customer just gets directed to paypal to perform the payment.


Help that I need is about...
When the customer goes from my page, to the paypal payment feature, I get a box asking me the customer to enter in a price value for the price.

My form does have a mc-gross field, although it did have an 'amount' field of which did not work either.

All other fields work 100% for me, like item name. but everything else does not seem to work.

I ASK IS...
++ What is the best way to send the amount $5. is it '$5' '$5.00' or '5.00'
++ I want to use a currency other than USD.
TRANZIT JIM is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 07-31-2009, 04:23 AM Re: How to do the paypal buy-now feature
Average Talker

Posts: 26
Name: Michael Gunin
Trades: 0
Hello,

Could you please post or PM me the code that you use or provide an URL so it would be possible to check it?
__________________
CS-Cart: buy easy, sell easier!
CS-Cart is offline
Reply With Quote
View Public Profile Visit CS-Cart's homepage!
 
Old 07-31-2009, 05:38 AM Re: How to do the paypal buy-now feature
chrishirst's Avatar
Super Moderator

Posts: 22,221
Location: Blackpool. UK
Trades: 0
Why would you need a URL??? you either know how to set up a paypal gateway or you don't!!


set a hidden field for the currency type.
Code:
<input type=hidden name="currency" value="GBP">
And for the amount to pay
Code:
<input type="hidden" name="amount" value="5.5">
DO NOT use a currency symbol in the value.

READ the integration guide it tells you how to do this and gives you a list of the currency codes.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs

Last edited by chrishirst; 07-31-2009 at 05:52 AM..
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-31-2009, 08:30 AM Re: How to do the paypal buy-now feature
Skilled Talker

Posts: 88
Trades: 0
I do have those two lines as this


< input name="amount" value="14.00" type="hidden" >
< input name="currency" value="AUD" type="hidden" >

Although the amount had PHP tags in it, and it will have when I get it working. But this example did not work.


The following code does in fact get sent through

< input name="item_name" value="<?php
echo 'Listing in NewWebsitesNowOpen - Statue level = '.$r['statue'];
?>" type="hidden" >


While the $14.00 does not appear in the paypal page, the text 'listing in....' does appear in it.
TRANZIT JIM is offline
Reply With Quote
View Public Profile
 
Old 07-31-2009, 08:33 AM Re: How to do the paypal buy-now feature
Skilled Talker

Posts: 88
Trades: 0
Would any of these make it not work?

< input name='no_shipping' value='1' type="hidden" >
< input name="rm" value="2" type="hidden" >

It does appear as the "invoice" gets sent to paypal, but paypal will not send that onto me later on.

I know this for sure as I have two invoices. One I had paid, and each time I re-try and resend that one, paypal gives me a message 'invoice has been paid' whereas the other one does not get that message at all.
TRANZIT JIM is offline
Reply With Quote
View Public Profile
 
Old 07-31-2009, 08:44 AM Re: How to do the paypal buy-now feature
Skilled Talker

Posts: 88
Trades: 0
Do I need to have a secure HTTPS stuff for this to work.

Eventhough I will not be dealing with persons private information, would it matter that I am not HTTPS?

That I mean, would Paypal automatically not work because I am HTTP not HTTPS?

Although some of the information did get sent.
TRANZIT JIM is offline
Reply With Quote
View Public Profile
 
Old 07-31-2009, 02:12 PM Re: How to do the paypal buy-now feature
chrishirst's Avatar
Super Moderator

Posts: 22,221
Location: Blackpool. UK
Trades: 0
you do not need a secure site.

Any characters other than numeric values (0-9 or .) will cause the value to be NULLED by paypal.

There should be no PHP code in the rendered form, only HTML form elements and the values.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-01-2009, 12:02 AM Re: How to do the paypal buy-now feature
Skilled Talker

Posts: 88
Trades: 0
Ok, I have used a form which has exactly the html form code as I have shown above.

Done it many ways, but the paypal website still asks for the price value.


Would there have been some setting I need to change in Paypal to ensure the paypal website would accept what I am trying to do.

Should I go for the add to cart button rather than the buy now button?
TRANZIT JIM is offline
Reply With Quote
View Public Profile
 
Old 08-01-2009, 12:37 AM Re: How to do the paypal buy-now feature
Skilled Talker

Posts: 88
Trades: 0
UPDATE.
The paypal website still does not accept the payment amount I accept.

However, I the IPN feature now works. Both with the refund of an earlier transaction, and again when I repeated the transaction.

One problem still remains is, when paypal sends me to the 'return' address or the 'cancel_return' address, my understanding is that paypal will also send the custom and invoice values through.
It does that to the IPN page, but not with the 'return' nor 'cancel_return' pages.

Why would the paypal website not send them through?
TRANZIT JIM is offline
Reply With Quote
View Public Profile
 
Old 08-01-2009, 07:53 PM Re: How to do the paypal buy-now feature
Brian07002's Avatar
Defies a Status

Posts: 1,585
Name: ...
Location: ...
Trades: 0
Did you try a donation button?
__________________
Sig Less - Have some site you want me to put here? Will put here for a couple of paypal bucks.
Brian07002 is offline
Reply With Quote
View Public Profile
 
Old 08-04-2009, 09:35 PM Re: How to do the paypal buy-now feature
Skilled Talker

Posts: 88
Trades: 0
UPDATE - The payment set feature has now been solved.


Thanks to advice from the paypal website, whos technicians where very helpful and quick. With thanks from me.

The issue was that my button was a 'hosted' button. That means I set the amount or value in the paypal website when I get the button. I can not override this value with the form data.

I removed this line, and it has worked 100% each time. So it is now problem solved.

I had not shown the hosted button line from the code I have shown you lot in this thread above, as I felt there was a security issue in doing that.

The process that happens when they do the 'notify_url' also works, so the important bit which processes the transaction result should be fine, although I have not tested this since I have taken out the hosted-button-id line.

Will let you know when it is all working 100%
TRANZIT JIM is offline
Reply With Quote
View Public Profile
 
Old 08-05-2009, 03:56 AM Re: How to do the paypal buy-now feature
Average Talker

Posts: 26
Name: Michael Gunin
Trades: 0
It's great to hear about your results, thank you for keeping us informed!
__________________
CS-Cart: buy easy, sell easier!
CS-Cart is offline
Reply With Quote
View Public Profile Visit CS-Cart's homepage!
 
Reply     « Reply to How to do the paypal buy-now feature
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.16610 seconds with 13 queries