forgot password?


   
1 of 2
1
Pay with PayPal Link? 
Posted: 06 July 2008 09:21 PM   [ Ignore ]  
Newbie
Rank
Total Posts:  21
Joined  2008-07-01

Hey everyone,

I’m loving bamboo invoice.. but the only real thing I would like to be able to do is to have a “Click here to Pay this invoice” link that sends them to paypal to make the payment.  I know what file to edit to put a link in the pdf… but does anyone know how to go about this?  It would have to somehow tell paypal how much they should be paying on that invoice when it sends them to paypal.. and I have no idea how to go about this.

I understand this is kind of a paypal and kind of a bamboo invoice question, but if anyone could help me figure this out I would really appreciate it.  smile

Profile
 
 
Posted: 13 July 2008 07:30 AM   [ Ignore ]   [ # 1 ]  
Newbie
Rank
Total Posts:  14
Joined  2008-05-30

If you invoice for the same “objects” and prices, you could create a buy me now button in paypal, see http://namu6.com/766/, otherwise you will have to create a whole extra payment option: https://www.paypal.com/nl/cgi-bin/webscr?cmd=_additional-payment-overview-outside

It’s all not that straightforward I’m afraid. You could always hire someone with the necessary technical skills to make something like this for you, but I wouldn’t hold my breath for this to emerge without incentive smile

Profile
 
 
Posted: 13 July 2008 09:06 AM   [ Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  21
Joined  2008-07-01

Since I do contract design work, the amount varies on each invoice.  I would ideally like to hard-code in the link to pay the invoice into the pdf invoice and have that code pull the amount from the invoice amount that gets entered into the BambooInvoice system.  I think I understand enough of how this would work, but actually doing it is over my head I think.  I can make the email payment buttons using the paypal button generator, it’s the just part where I would tie it into the BambooInvoice invoice amount part that I’m unsure of.

I already have a paypal merchant account, so I can make buy now buttons that say “Pay Now” and the html can be edited so a new price can be inserted, but I can’t hard-code that into the invoice so it’s always there if I have to keep going in and changing it with every invoice.  And I can’t add the html code in the Notes section of the invoice because it won’t accept html.

Can it be done where this html code can pull the amount from BambooInvoice and insert it into the right spot in the html link?  And how much would someone charge me to do this?

Profile
 
 
Posted: 14 July 2008 05:29 AM   [ Ignore ]   [ # 3 ]  
Newbie
Rank
Total Posts:  14
Joined  2008-05-30

I was unaware you could change the amount in the link. I was under the impression you had to generate a payment request for every amount you wanted to bill.

Anyway, assuming you actually can change the amount in the URL, you can use the $row->total_with_tax variable in the correct view
(like application/view/invoices/view.php for HTML and pdf.php for the pdf)

Profile
 
 
Posted: 14 July 2008 08:16 AM   [ Ignore ]   [ # 4 ]  
Newbie
Rank
Total Posts:  21
Joined  2008-07-01

There is a place when you go to make the buttons where you can say “yes” or “no” to encryption… “no” says “Non-encrypted buttons allow you to directly modify your HTML code, create option fields, and generate email links.”

The html it gives you when you select “no” to encryption and generate the button is:
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=billing@littleolemedesigns.com&item_name=PayInvoices&amount=500.00&no_shipping=0&no_note=1&currency_code=USD&lc=US&bn=PP-BuyNowBF&charset=UTF-8

In that one, I told it the invoice amount for that “Pay Now” button was to be $500, and you can see that in the code:  PayInvoices&amount=500

I’m not sure how this would work… I don’t know if it would be something like:
PayInvoices&amount;=$row->total_with_tax

Profile
 
 
Posted: 14 July 2008 08:25 AM   [ Ignore ]   [ # 5 ]  
Newbie
Rank
Total Posts:  21
Joined  2008-07-01

Well scratch that… if I change the amount in the link it doesn’t work.  I guess somehow paypal keeps track of the buttons created so you can’t change out the amounts when you do the links.

hmmmmm.....

Seems like there would have to be a way to do this.  You can use paypal with shopping cart systems that generate uncertain amounts, so it’s got to be possible…

Profile
 
 
Posted: 14 July 2008 10:13 AM   [ Ignore ]   [ # 6 ]  
Newbie
Rank
Total Posts:  14
Joined  2008-05-30

Ow,wow, never knew it was that easy smile

I want this too, give me a day or two and I’ll give you a line you can put in the pdf-view php script, it’s quite easy, but I’m a bit busy today smile

Profile
 
 
Posted: 14 July 2008 06:44 PM   [ Ignore ]   [ # 7 ]  
Newbie
Rank
Total Posts:  14
Joined  2008-05-30
LittleOleMeDesigns - 14 July 2008 08:25 AM

Well scratch that… if I change the amount in the link it doesn’t work.  I guess somehow paypal keeps track of the buttons created so you can’t change out the amounts when you do the links.

Are you sure? I tested it and it does change the amount, I also found a mention of changing the details (including the price) in the link when you wanted to, you just “have to understand HTML a little,though” they warn smile Anyway, I’m gonna work on that snippit of code tomorrow, although it’ll have to be something like:

$amount number_format($row->total_with_tax2'.''');
echo 
"https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=billing@littleolemedesigns.com&item_name=PayInvoices&amount;=$amount&no_shipping=0&no_note=1&currency_code=USD&lc=US&bn=PP-BuyNowBF&charset=UTF-8";

So, if you understand the pdf.php view you could already play with it yourself.

Profile
 
 
Posted: 14 July 2008 06:51 PM   [ Ignore ]   [ # 8 ]  
Newbie
Rank
Total Posts:  21
Joined  2008-07-01

Ah… cool.. you’re right… not sure what I was doing to it earlier… must have been deleting something I didn’t need to delete when I was changing the price around… awesome… maybe it’s going to be easier than I thought it would be…

Thank-You so much for your help.  I’m decent with html and css… but not good at all with php.  I’ll try to mess around with it some and see if I can manage something using that code you put up there.  If I get it tested out before you do, I’ll post it in here.

Thank-You again!

Profile
 
 
Posted: 19 July 2008 09:52 AM   [ Ignore ]   [ # 9 ]  
Newbie
Rank
Total Posts:  21
Joined  2008-07-01

Ok… I finally got some time to play with this… and this code works:

<font size="2pt">
<?php
$amount 
number_format($row->total_with_tax2'.''');
echo 
"https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=billing@littleolemedesigns.com&item_name=PayInvoices&amount;=$amount&no_shipping=0&no_note=1&currency_code=USD&lc=US&bn=PP-BuyNowBF&charset=UTF-8"

?>
</font>

I had to make the font size tiny so it doesn’t get cut off or part of it stuck on a new line or else the link doesn’t work.  I’m going to mess around with trying to figure out how to make a hyperlinked image, I think that would look a lot better.

I tinkered with the syntax on the $amount=$amount&.... part just a bit, not much.. to make it work.

And for anyone else that stumbles on this thread.. don’t use this code exactly as is or you’ll have people paying me.. lol.. go to your paypal account and generate a paypal “Pay Now” button under “Merchant Services” --> “Buy Now Button” and make sure to select the “No” option under “Button Encryption”

Profile
 
 
Posted: 19 July 2008 10:33 AM   [ Ignore ]   [ # 10 ]  
Newbie
Rank
Total Posts:  14
Joined  2008-05-30

I’m not sure why you put the semicolon next to “amount”, since for me, that breaks the URL.

In any case, it’s easy to make this into a link, straightforward HTML:

echo “<a >Pay with Paypal</a>”;

Or replace “Pay with Paypal” with <img > and there you go. Find nice paypal buttons on the paypal site I guess smile (one note though, I’ve never gotten anything accept simple JPEGS to work with dompdf in Bamboo)

Profile
 
 
Posted: 19 July 2008 10:34 AM   [ Ignore ]   [ # 11 ]  
Newbie
Rank
Total Posts:  14
Joined  2008-05-30

ah the forum messes with the links, lets try this

echo "<a >Pay with Paypal</a>";

nope, fails again *sigh*

anyway, use < href = “ $url “ > something to link to < / a >

without the excess spaces, and replacing $url with the url we generated before.

Profile
 
 
Posted: 19 July 2008 12:03 PM   [ Ignore ]   [ # 12 ]  
Newbie
Rank
Total Posts:  21
Joined  2008-07-01

Sorry.. the semi-colon was in the code you put in there.. it was breaking the url for me too.  I took it out right after I posted that.

I tried this:

<font size="2pt">
<?php
$amount 
number_format($row->total_with_tax2'.''');
?>

<><img ></a>


</
font>

But for some reason the image is showing up as a broken image in the pdf.  I checked the url, and it’s right.  How is it that this image doesn’t work in the pdf, but the logo image does?

Profile
 
 
Posted: 19 July 2008 12:07 PM   [ Ignore ]   [ # 13 ]  
Newbie
Rank
Total Posts:  21
Joined  2008-07-01

Geez… that’s a bit annoying with the code view not working right in here… here’s the code I’m using:

http://invoice.littleolemedesigns.com/pdfcode.txt

Profile
 
 
Posted: 19 July 2008 02:04 PM   [ Ignore ]   [ # 14 ]  
Administrator
RankRankRankRank
Total Posts:  1274
Joined  2007-09-16

Yeah, it is annoying apologies.  It was a security enhancement that got too aggressive. I think I’ve fixed it up.  Here’s a test.

<a href="somthing"><img src="something"></a>

Profile
 
 
Posted: 19 July 2008 02:08 PM   [ Ignore ]   [ # 15 ]  
Newbie
Rank
Total Posts:  21
Joined  2008-07-01

Awesome… thanks derek…

Here’s that code again so it’s posted in this thread if someone else were to come along and I don’t still have that up on my site for some reason in the future:

<font size="2pt">
<?php
$amount 
number_format($row->total_with_tax2'.''');
?>

<a href="<?php echo "><img src="http://invoice.littleolemedesigns.com/img/paypal.jpg"></a>


</
font>

Profile
 
 
   
1 of 2
1