Google Checkout Donation No Shipping - google-checkout

I am implementing a Donate Now system using Google Checkout. One really frustrating part to figure out is how to not require users to input a shipping address for their donation (since it's a pure donation, no shipping address is required). I found the documentation for Digital Delivery and the ability to add a class to products, but I'm just using the Donate Now form that is generated by Google and have no idea where to add this class to make it so no shipping address is required.
Below is the form I'm using:
<form action="https://sandbox.google.com/checkout/api/checkout/v2/checkoutForm/Merchant/MY_NUMBER" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" onSubmit="return adjustDescription()" target="_top">
<input name="item_name_1" type="hidden" value="Donation"/>
<input name="item_description_1" type="hidden" value="Donation Description"/>
<input name="item_quantity_1" type="hidden" value="1"/>
<input name="item_currency_1" type="hidden" value="USD"/>
<input name="item_is_modifiable_1" type="hidden" value="true"/>
<input name="item_min_price_1" type="hidden" value="0.01"/>
<input name="item_max_price_1" type="hidden" value="25000.0"/>
<input name="_charset_" type="hidden" value="utf-8"/>
<input id="item_price_1" class="center" name="item_price_1" type="text" />
<input disabled style="opacity:0.6;" name="donate_submit" alt="Donate" src="https://sandbox.google.com/checkout/buttons/donateNow.gif?merchant_id=MY_NUMBER&w=115&h=50&style=white&variant=text&loc=en_US" type="image" />
So I'm not sure if there's another way to not require a shipping address, but if anyone can tell me where to put the "product-digital" class to accomplish this, that would be helpful.

Related

Validation of prefilled contact form fields in Magento fails

My Magento contact form has the field names prefilled, not labelled.
<input name="name" id="name" value="Name" class="required-entry input-text" type="text" />
Since the field is prefilled, the validation "required-entry" fails.
Is there a not-so-dirty way to get the validation working with prefilled values?
just try to use. Placeholder to make prefilled text
<form action="demo_form.asp">
<input type="text" name="fname" placeholder="First name"><br>
<input type="text" name="lname" placeholder="Last name"><br>
<input type="submit" value="Submit">
</form>
that would sure help you.

How can I fix character encoding MVC3?

Hello everyone I have added a search engine on my project but when I click the search button some characters are going crazy like ş seems ÅŸ. After that I have added the code as you can see below at Shared cshtml ;
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
Finally I have added this to webconfig file
<system.web>
<globalization culture="tr-TR" uiCulture="tr-TR" fileEncoding="utf-8"
responseEncoding="utf-8" requestEncoding="utf-8" />
But nothing was changed. Could you help me please ?
Here is my search code
<form method="get" action="http://www.google.com.tr/custom" target="google_window">
<input type="hidden" name="domains" value="www.maltepe.bel.tr"></input>
<label for="sbi" style="display: none"></label>
<input type="text" name="q" style="height:14px;width:167px" value="" id="sbi"></input>
<button type="submit" name="sa" value="Arama" id="sbb"></button>
<input type="hidden" name="sitesearch" value="www.maltepe.bel.tr" id="ss1"></input>
<input type="hidden" name="client" value="pub-2231511596197409"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="channel" value="1809328852"></input>
<input type="hidden" name="ie" value="ISO-8859-9"></input>
<input type="hidden" name="oe" value="ISO-8859-9"></input>
<input type="hidden" name="cof" value="GALT:#E9382F;GL:1;DIV:#CCCCCC;VLC:7E3939;AH:center;BGC:FFFFFF;LBGC:FF3333;ALC:E9382F;LC:E9382F;T:000000;GFNT:7E3939;GIMP:7E3939;FORID:1"></input>
<input type="hidden" name="hl" value="tr"></input>
</form>
Try to change ie and oe value to "UTF-8" see if it is ok.

Signing into my Wordpress blog newsletter from external site - how to?

I want to have a newsletter on my WP blog, and there are plenty of plugins available to do this job. So no problem.
I have external website based on PHP framework, CodeIgniter. And I want to have a form, which allows me to signing into my WP Blog newsletter - is it possible? If yes, how to do it?
These 2 sites are on the same server.
Blog is:
www.mysite.com
Webiste is:
www.mysite.com/site2/
You can use the WP login form code to submit user id/password from your CI page to wp-login.php. You can set the redirect_to form variable to whatever landing page you want.
<form name="loginform" id="loginform" action="http://mysite.com/wp-login.php" method="post">
<p>
<label>Username<br />
<input type="text" name="log" id="user_login" class="input" value="" size="20" tabindex="10" /></label>
</p>
<p>
<label>Password<br />
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label>
</p>
<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> Remember Me</label></p>
<p class="submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="Log In" tabindex="100" />
<input type="hidden" name="redirect_to" value="http://mysite.com/mysite2/somelandingpage.php" />
<input type="hidden" name="testcookie" value="1" />
</p>

How can I redirect a customer back to my website after a successful payment with Google Checkout?

I am doing a shopping cart with Google Checkout. I integrated Paypal already like below:
<form name="frmpay" method="post" action="success.php">
<input type="hidden" name="business" value="" />
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="image_url" value="https://www.paypal.com/en_US/i/btn/x-click-but22.gif" />
<input type="hidden" name="return" value="success.php" />
<input type="hidden" name="cancel_return" value="error.php" />
<input type="hidden" name="currency_code" value="GBP" />
<input type="hidden" name="lc" value="UK" />
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="item_name" value="<?=$res_item[name]?>" />
<input type="hidden" name="amount" value="<?=$_SESSION['amt']?>" />
<?php /*?><input type="hidden" name="shipping" value="<?=$_POST["shipping"]?>" /><?php */?>
<input type="hidden" name="quantity" value="1" />
</form>
How can I integrate Google Checkout like this? How can I return success page after payment in Google checkout? What is the input type for redirect url after successful payment in Google Checkout? I tried a lot for this but I did not get anywhere.
Here is my code:
<form method="POST" action="https://sandbox.google.com/checkout/api/checkout/v2/checkoutForm/Merchant/REPLACE_WITH_YOUR_SANDBOX_MERCHANT_ID" accept-charset="utf-8">
<!-- No product -->
<!-- No tax code -->
<!-- No shipping code -->
<input type="hidden" name="_charset_" />
<!-- Button code -->
<input type="image"
name="Google Checkout"
alt="Fast checkout through Google"
src="http://sandbox.google.com/checkout/buttons/checkout.gif?merchant_id=REPLACE_WITH_YOUR_SANDBOX_MERCHANT_ID&w=180&h=46&style=white&variant=text&loc=en_US"
height="46"
width="180" />
</form>
There is no automatic re-direct for the buyer after the Google Checkout transaction finishes. However, you can provide a link that the user can click and get back to your site after completing the order.
See the continue_url paramenter:
http://code.google.com/apis/checkout/developer/Google_Checkout_HTML_API_Parameter_Reference.html#tag_continue-shopping-url
I have the same problem.
My rough variant is to sell a link to a user, and after the user has successfully paid for the link, he will be redirected to the "thank you" page on Google Checkout, where he will see my link and a message from me, then he clicks on the link and gets back to my site
A link looks like mysite.com/orderhasbeenpayd/1342
but as I said it is a rough variant

PayPal discount can't make it work

I'm trying to setup a discount for a the whole cart using PayPal + Codeigniter, I got this working withouth the discounts.
As far as I've read the only thing that I would need to do is set a hidden field discount_amount_cart as I saw here
Here is my form:
<form method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr" name="paypal_form">
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="upload" value="1" />
<input type="hidden" name="currency_code" value="EUR" />
<input type="hidden" name="business" value="biz_1271300483_biz#xxxx.xx" />
<input type="hidden" name="return" value="http://xxxxxx.com/website/pt/paypal/success/8/4c237a03897e0" />
<input type="hidden" name="cancel_return" value="http://xxxxxxx.com/website/pt/paypal/cancel/8/4c237a03897e0" />
<input type="hidden" name="notify_url" value="http://xxxxxx.com/website/pt/paypal/ipn" />
<input type="hidden" name="custom" value="" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="cpp_header_image" value="http://xxxxxxxxx.com/images/logo.png" />
<input type="hidden" name="image_url" value="http://xxxxxxxxx.com/images/logo.png" />
<input type="hidden" name="invoice" value="4c237a03897e0" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="discount_rate_cart" value="10.00" />
<input type="hidden" name="first_name" value="Foo Bar" />
<input type="hidden" name="city" value="xxxx" />
<input type="hidden" name="address1" value="xxxxxx" />
<input type="hidden" name="zip" value="xxxxxx" />
<input type="hidden" name="lc" value="pt" />
<input type="hidden" name="email" value="xxxxx#xxx.pt" />
<input type="hidden" name="country" value="PT" />
<input type="hidden" name="item_name_1" value="Cloud Hosting WIN Business 25GB" />
<input type="hidden" name="item_number_1" value="200.00000003" />
<input type="hidden" name="amount_1" value="156" />
<input type="hidden" name="quantity_1" value="1" />
<input type="hidden" name="tax_rate_1" value="20" />
<p><input type="submit" name="pp_submit" value="Pagar" class="submit" /></p>
</form>
But when I "post" the fields the discount line won't appear, do I need to activate something in the merchant account, am I doing something wrong?
Cheers
Got it,
From the PayPal documentation:
When you use consolidated discount amounts, you should specify a consolidated tax value in tax_cart. If you do not specify a tax value and your profile specifies a tax rate, your profile tax rate is applied after the consolidated discount value is applied.
So I need to define my "global" tax amount for the cart with tax_cart.
The name of your discount input appears to be wrong:
<input type="hidden" name="discount_rate_cart" value="10.00" />
should be:
<input type="hidden" name="discount_amount_cart" value="10" />
Use discount_amount_cart to charge a
single discount amount for the entire
cart.
Use discount_amount_x to set a
discount amount associated with item x
Use discount_rate_cart to charge a
single discount percentage for the
entire cart.
discount_rate_cart - Applies to
entire cart however, this variable
will only work with the "Upload"
Method. Not the standard Add to Cart
variables.
This variable will be ignored if you
are including any individual sales tax
amount or rate in your upload method
code. This is because the sales tax
needs to be calculated after the
discount is applied to your items
therefore, the discount is applied to
the item Subtotal, not the Total.
Note, If you just using the standard
Add to Cart buttons, there no Discount
variables for the entire cart. as
they "only" apply a Discount to an
individual item.

Resources