Using WebYep for a PayPal "Buy Now" button

General discussions about WebYep
Post Reply
bcbounders
Posts: 16
Joined: Sun Oct 14, 2007 10:52 pm

Using WebYep for a PayPal "Buy Now" button

Post by bcbounders » Sun Oct 14, 2007 10:57 pm

Does anyone have any experience inserting PayPal's "Buy Now" button code into a WebYep field? I'm trying to setup a page for my cousin who does woodworking... and I'd like him to be able to add new items for sale, including a PayPal Buy Now button so users can click it to immediately go to a PayPal page.

I've tried a longText field, but that doesn't seem to work.

The PayPal code looks like this:

Code: Select all

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIH4QYJKoZIhvcNAQcEoIIH0jCCB84CAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1U...-----END PKCS7-----
">
</form>


I appreciate any help.

johannes
Objective Development
Objective Development
Posts: 815
Joined: Fri Nov 10, 2006 4:39 pm
Contact:

Post by johannes » Tue Oct 16, 2007 4:58 pm

Please use the Rich Text Field for HTML content - the Long Text Field does not support HTML content but just it's own formatting code.

bcbounders
Posts: 16
Joined: Sun Oct 14, 2007 10:52 pm

Post by bcbounders » Wed Oct 17, 2007 9:50 am

johannes wrote:Please use the Rich Text Field for HTML content - the Long Text Field does not support HTML content but just it's own formatting code.

johannes,

Thanks so much for the response. That was the answer! The Rich Text Field works like a charm.

Thanks again!

- John

bcbounders
Posts: 16
Joined: Sun Oct 14, 2007 10:52 pm

Re: Using WebYep for a PayPal "Buy Now" button

Post by bcbounders » Tue Oct 06, 2009 7:22 pm

juanilata wrote:How long does it take to receive a payment via Paypal? I am about to sell something on ebay (auction time 5 hours left) and the buyer is paying via paypal. Does paypal send me a check? Or do they send the money to my bank? Is it instant?

Juanilata,

The payment from your buyer will appear immediately in PayPal. Then, if you've got PayPal connected to your bank account, you request a withdrawal and PayPal will transfer the funds to your bank account (that process may take a couple of days, but it's dependent upon your bank's policies, etc.). I think you CAN request that PayPal send you a check instead... but the electronic funds transfer is much faster.

Hope that helps.

- John

cm
Rank 1
Rank 1
Posts: 21
Joined: Sun Feb 22, 2009 2:11 pm

Re: Using WebYep for a PayPal "Buy Now" button

Post by cm » Tue Oct 13, 2009 1:11 am

Hello,
I am experimenting with PayPal buttons in a WebYep Loop-Element. The user should be able to add products (name, product photo, description and price). When pushing the "Add to cart" button, the product name and the price are placed in the cart. It's not perfect, but seems to be working already. Maybe You find it useful or maybe someone has an idea how to make it better.

<?php // ><!--
$webyep_sIncludePath = "./";
$iDepth = 0;
while (!file_exists($webyep_sIncludePath . "webyep-system")) {
$iDepth++;
if ($iDepth > 10) {
error_log("webyep-system folder not found.", 0);
break;
}
$webyep_sIncludePath = ($webyep_sIncludePath == "./") ? ("../"):("$webyep_sIncludePath../");
}
if (file_exists("$webyep_sIncludePath/webyep-system/programm")) $webyep_sIncludePath .= "webyep-system/programm";
else $webyep_sIncludePath .= "webyep-system/program";
$sMain = "$webyep_sIncludePath/webyep.php";
if (file_exists($sMain)) include($sMain);
// --> <dummy ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<title></title>
</head>
<body>
<?php foreach (WYLoopElement::aLoopIDs("ProductsLoop") as $webyep_oCurrentLoop->iLoopID) { $webyep_oCurrentLoop->loopStart(true); ?>
<h3>
Product Name:<?php webyep_shortText("Name", false); ?>
</h3>
<?php webyep_image("Product_Photo", false, '', '', '', 120, 100, true); ?>
<br />
Description: <?php webyep_richText("Description", false, "", true); ?>
<br />
Price: <?php webyep_shortText("Price", false); ?>
<br />
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr"
method="post">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="YourPaypalAccount@xyz.com">
<input type="hidden" name="item_name" value="<?php echo webyep_sShortTextContent("Name", false); ?>">
<input type="hidden" name="item_number" value="id1">
<input type="hidden" name="amount" value="<?php echo webyep_sShortTextContent("Price", false); ?>">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="EUR">
<input type="submit" name="submit" value="Add to cart">
</form>
<br />
<?php $webyep_oCurrentLoop->loopEnd(); } ?>
<?php webyep_logonButton(true); ?>
</body>
</html>

johannes
Objective Development
Objective Development
Posts: 815
Joined: Fri Nov 10, 2006 4:39 pm
Contact:

Re: Using WebYep for a PayPal "Buy Now" button

Post by johannes » Wed Oct 14, 2009 7:07 pm

Thanks cm for contributing that code! Looks very good - would not know what to improve...

Post Reply