I'm using a free shopping cart template called Roman Cart (https://romancart.com).
Per their documentation, they have the ability to post customer details to the cart (https://www.romancart.com/shopping-cart/how-it-works-examples/#aa).
But unfortunately, me being a newbie, am trying to figure out how and where I should use this? Should I be sending the customer details along with the tag I use to add items to the shopping cart?
<form action="https://www.romancart.com/cart.asp" method="post"><input type="submit" value="Add to Order"><br>
<input type="hidden" name="price" value="670.8">
<input type="hidden" name="storeid" value="10000">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="itemname" value="Pirinho"><br>Include Sample
<select name="itemname2"required oninvalid="this.setCustomValidity('Select Sample Preference')" oninput="this.setCustomValidity('')" >
Include sample
<option value="">-Select-</option>
<option value="Sample Preference: Green {15.00}">Green (+$)</option>
<option value="Sample Preference: Roasted {15.00}">Roasted (+$)</option>
</select><br></form>
So to send customer details, should I start using it like this?
<input type="hidden" name="CompanyName" value="ACME">
Also, I use Wordpress for people to register. How can I get the current_user information and send it alon with the tag?
<input type="hidden" name="CompanyName" value="wp_get_current_user();echo 'Company Name'">
I'm pretty sure the above is incorrect and there is a better way to execute this. Can somebody please help me? I will be forever so grateful
Thanks a million!
Related
how about when you down vote something you leave a comment on why you down voted so the poster has an idea how they can improve on the way they asked something
So I have an input field like so:
<form action="search.php?do=process" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="childforums" value="1" />
<input type="hidden" name="exactname" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="text" name="query" tabindex="1001" id="overlay-search" class="no-border overlay-search bg-transparent" placeholder="Search..." autocomplete="off" spellcheck="false" />
</form>
what I'm trying to accomplish is alternative buttons that will search the text in the input on say google.com but I have had no success in finding a solution to this =/
the way I'm trying to get it to work is like:
Not happy with your results? Try searching on google.
I have searched and searched and have found nothing related to this, although I doubt I'm searching the right thing. Any help in achieving this would be greatly appreciated =)
searches I'm considering on including:
Facebook
Google
Bing
Yahoo
and more
A simple solution will be getting the value of the posted input field and just echoing out .Before that you must add a submit button at the end of your form.
<input type="submit" name="submit" value="Search"/>
And then do something like below in your search.php file.
<?php
// Check if the submit button is clicked
if(isset($_POST['submit'])) {
// And then do something
echo 'Not happy with your results?Try searching on google.";
}
?>
As the title states, I'm trying to incorporate many searches into one search bar. More specifically, Google and Amazon. I have setup a radio option to set which site to search when one is selected.
This is the code I currently have:
<form method="get" action="http://www.google.com/search">
<div align="center" style="font-size:75%">
<input type="text" name="q" size="25" maxlength="255" value="" />
<input type="submit" value="Google or Amazon Search" /></br>
<input type="radio" name="sitesearch" value="" />The Web
<input type="radio" name="sitesearch" value="yoursite.com" checked />This Site
</div>
</form>
I have this form for Amazon, but I'm just unsure how to code it into the one search bar.
<form action="http://amazon.com/s/ref=nb_sb_noss" method="get" target="_blank">
<input type="text" id="twotabsearchtextbox" name="field-keywords">
<input type="submit" value="Search" class="nav-submit-input">
</form>
Use JavaScript to change the actual form action in page's DOM (and other parameters, if needed), depending on the user selection (use onclick event on radio to montior for change for example). Simple as that. You won't be able to do that in pure HTML without using some kind of proxy server to redirect the requests and return the results appropriately.
document.your-form.action = (google_selected) ? "http://www.google.com/search" : "http://amazon.com/s/ref=nb_sb_noss";
etc.
I'm trying to help someone with a problem, where you can donate for some points, but you the source code will allow you to edit the values of the paypal button.
For instance, i choose 5 points which should cost 5 dollar, but when I edit source code I can see the whole paypal form with values, and edit the values.
So how can I secure the form so that it cannot be edited?
Here's the code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="at" value="nBWAy2wwJn1O1LdoLcMn8AOdPxBBUxhnZfqFvAlGQq1oDm0czxn5FBcpgIW">
<input type="hidden" name="business" value="admin#worldofthegods.com">
<input type="hidden" name="item_name" value="DP|1|452160">
<input type="hidden" name="amount" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://www.worldofthegods.com/donate.php?action=done">
<input type="hidden" name="cancel_return" value="http://www.worldofthegods.com/donate.php?action=cancel">
<input type="hidden" name="notify_url" value="http://www.worldofthegods.com/ipn_donator.php">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="image" src="http://worldofthegods.com/images/PaypalButton.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
In this way, it's impossible. I guess what you want to do, and this is not the correct way you are following.
You need to verify each payment and make sure they are valid and payed in correct amount.
Paypal IPN is the solution and you need some Server-side programming.
Read more:
Paypal API Question - Can I use Return Url to verify payment
How to verify successful payment of paypal
I'd suggest using something like Express Checkout, which allows you to send the transaction details in an API call instead of showing them in HTML code to the buyer.
However, barring that, your next best option is to use Encrypted Website Payments. https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/encryptedwebpayments/#id08A3I0P017Q
I run a gold intangible electric goods which I am selling business.
Recently I came across some difficulties with PayPal where customers started doing chargebacks, I have now switched over to Google Checkout and now am making the website more secure against this type of fraud.
So I am collecting the user's IP address / hostname / user-agent / proxy information which I will send to credit card companies and FBI to resolve chargebacks from now on, I can't really start a database since my webiste doesn't use any databases just session based.
So I am sending for now the information as a secondary item.. with a price of 0.00$ (free). In base64 encoded format.
So how do I get the customer's information, but make it so the customer doesn't see this information, as first of all it may scare some customers.
The HTML Code my shopping website generates is like this.
<form method="POST" action="https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/*Snipped*" accept-charset="utf-8">
<!-- Sell digital goods with email delivery of download instructions (with tax, no shipping) -->
<input type="hidden" name="hl" value="pt_BR">
<input type="hidden" name="item_description_1" value="Character: [5464564]: Tiberica">
<input type="hidden" name="item_name_1" value="10,000 Gold [Nation]"><input type="hidden" name="item_price_1" value="0.01">
<input type="hidden" name="item_currency_1" value="USD">
<input type="hidden" name="item_quantity_1" value="1">
<input type="hidden" name="shopping-cart.items.item-1.digital-content.display-disposition" value="PESSIMISTIC">
<input type="hidden" name="shopping-cart.items.item-1.digital-content.email-delivery" value="true">
<!-- Customer information -->
<input type="hidden" name="item_name_2" value="Customer Information [Não é importante para o cliente]">
<input type="hidden" name="item_description_2" value="SVAgYWRkcmVzczogNzEuMTkwLjE3Ni40OQpSZW1vdGUgSG9zdDogcG9vbC03MS0xOTAtMTc2LTQ5Lm55Y21ueS5maW9zLnZlcml6b24ubmV0IC0gClVzZXIgQWdlbnQ6IE1vemlsbGEvNS4wIChXaW5kb3dzIE5UIDUuMSkgQXBwbGVXZWJLaXQvNTM1LjIgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvMTUuMC44NzQuMTIxIFNhZmFyaS81MzUuMgpQcm94eT86IApQcm94eSBIb3N0PzogClByb3h5IFNlcnZlcj86IAo=">
<input type="hidden" name="item_price_2" value="0.00">
<input type="hidden" name="item_currency_2" value="USD">
<input type="hidden" name="item_quantity_2" value="1">
<input type="hidden" name="shopping-cart.items.item-2.digital-content.display-disposition" value="PESSIMISTIC">
<input type="hidden" name="shopping-cart.items.item-2.digital-content.email-delivery" value="true">
<!-- No tax code -->
<!-- No shipping code -->
<input type="hidden" name="_charset_" value="utf-8">
<input type="image" name="Google Checkout" alt="Fast checkout through Google" src="index_files/checkout_br.png" style="position: relative; top: -38px;left: 486px;">
</form>
Thanks.
Why not use PHP (or ASP) and save the details to a database before forwarding to Google Checkout, then update the order with the transaction ID using callbacks?
Basically I want a functionality to download code mywebsite.
I checked following link for google checkout digital products.
https://checkout.google.com/support/sell/bin/answer.py?answer=39011
I created buy now button for digital product from sandbox using this link.HTML code redirects me to google checkouts as usual.
But it does not give me any download link anywhere after payment. ??
<form action="https://sandbox.google.com/checkout/api/checkout/v2/checkoutForm/Merchant/859574590497884" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" target="_top">
<input name="item_name_1" type="hidden" value="mycode"/>
<input name="item_description_1" type="hidden" value="this item is all about my code"/>
<input name="item_quantity_1" type="hidden" value="1"/>
<input name="item_price_1" type="hidden" value="1251.0"/>
<input name="item_currency_1" type="hidden" value="USD"/>
<input name="shopping-cart.items.item-1.digital-content.description" type="hidden" value="Please read this instructions.."/>
<input name="shopping-cart.items.item-1.digital-content.url" type="hidden" value="http://www.xxxxxxxx.in/xxxxxxxx/xxxxxx/20110929034224791156.pdf"/>
<input name="_charset_" type="hidden" value="utf-8"/>
<input alt="" src="https://sandbox.google.com/checkout/buttons/buy.gif?merchant_id=859574590497884&w=117&h=48&style=white&variant=text&loc=en_US" type="image"/>
You need to use continue_url
<input type="hidden" name="continue_url" value="http://www.example.com/download"/>
Google Checkout offer a digital delivery solution, with various options for providing access to the digital content.
Please be aware that credit card transactions are authorized and charged AFTER the user places the order. Depending on how valuable the content is, you may want to hold off providing the URL to the download content until payment is guaranteed.
More details in this doc:
http://code.google.com/apis/checkout/developer/Google_Checkout_Digital_Delivery.html