how to stop a paypal ticket transction from going through? - paypal

There's a website with a bunch of handwritten html paypal code: ie, sample beneath:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<!-- Specify a Donate button. -->
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="email#address.org">
<input type="hidden" name="item_name" value="Luncheon">
<input type="hidden" name="cn" value="Add special instructions to the seller:">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_number" value="Luncheon Ticket">
<label>Select the number of tickets you would like to purchase:</label>
<select name="amount">
<optgroup label="Luncheon's Ticket">
<option value="45">1 Ticket - $45</option>
<option value="90">2 Tickets - $90</option>
<option value="135">3 Tickets - $135</option>
<option value="180">4 Tickets - $180</option>
<option value="225">5 Tickets - $225</option>
<option value="270">6 Tickets - $270</option>
<option value="315">7 Tickets - $315</option>
<option value="360">8 Tickets - $360</option>
<option value="405">9 Tickets - $405</option>
<option value="450">10 Tickets - $450</option>
</select>
<input type="hidden" name="on1" value="Names and Vegetarian Meals"><label>List guests' names and indicate if vegetarian meal is needed</label>
<input type="text" name="os1" placeholder="e.g., Jane Doe (vegetarian), John Doe">
<!-- Display the payment button. -->
<input type="submit" value="Purchase Ticket(s)" name="submit" title="PayPal - The safer, easier way to pay online!" class="paypal_btn expanded large button">
</form>
We are pulling down the code as we don't want to sell anymore tickets. But apparently, some people keep the paypal pages open for days ... not kidding here. So, when they're ready to purchase the tickets, the transaction goes through.
Is there a way short of cancelling (not really an option here) to prevent the tickets from going through?
For clarification, the page will no longer have paypal tickets available. But as stated, people keep the page open for days. Hence this whole quandary.
Is there anything I can do to prevent the transaction from going through with the code above?
EDIT
Kind of realized that I stated this question badly because I didn't think completely what I wrote down here. I asked if there's anything I can do to prevent the transaction from going through with the code above. But the code is going to be pulled down today ... so ... is there any other means to prevent the transactions from those people who leave those pages open for dayyyyyyssssss?!?!?!?

Related

Item description not showing up on details

I have a cart form that submits to paypal with the item_name and item_number. As of recently though, some of the paypal receipts (transaction details) I have been receiving are excluding the "item_number" in the description. I need this number to know what products the user has purchased.
The only common factor with the receipts that do not include the "item_number" are ones that have a "Receipt No:" with the text "Please keep this number for future reference, as your customer doesn't have a PayPal Transaction ID for this payment."
Any idea why this is happening, or what I need to do to get the "item_number" to show up on the receipt?
Code Example:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<label for="first_name">First Name*:</label>
<input type="text" name="first_name" id="first_name" class="required">
<label for="last_name">Last Name*:</label>
<input type="text" name="last_name" id="last_name" class="required">
<label for="email">Email*:</label>
<input type="text" name="email" id="email" class="required email">
<input type="hidden" name="item_name" value="Personalized Frame">
<input type="hidden" name="item_number" value="|S5|M8|T8|black">
<input type="submit" value="Add to Cart">
</form>

choose amount from dropdown list - paypal

I used the following code for my Donate button. When I choose amount in dropdown list and click Donate. It redirects to paypal site and asking me to enter the amount again but I already chosen amount in the dropdown list. Any help is appreciated. thanks.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<select name="amount" id="amount">
<option value="10">10 SEK</option>
<option value="20">20 SEK</option>
<option value="30">30 SEK</option>
<option value="40">40 SEK</option>
<option value="50">50 SEK</option>
</select>
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="xxxxxxx">
<input type="hidden" name="currency_code" id="currency_code" value="SEK">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
When using hosted PayPal buttons you'll need to configure the drop down options in the button creation wizard. If you want to include all of that on your own you'll need to use non-hosted buttons.

Cannot get Paypal subscribe button to work

I am trying to implement a simple subscribe button using Paypal.
I have used their button generator and then copy pasted that code into my webpage.
The form looks perfectly fine and when I select a package and then click subscribe I need to login to Paypal which also works but then I get this error:
The link you used to access the PayPal system is invalid. Check the link and try again.
This is my button code. What is wrong?
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XXXXXX">
<table>
<tr><td><input type="hidden" name="on0" value="Packages">Packages</td></tr><tr><td><select name="os0">
<option value="Donor">Donor: $5,00 USD</option>
<option value="Vip">Vip: $10,00 USD</option>
<option value="Svip">Svip: $15,00 USD</option>
<option value="Elite">Elite: $20,00 USD</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Minecraft username">Minecraft username</td></tr><tr><td><input type="text" name="os1" maxlength="200"></td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribe_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/sv_SE/i/scr/pixel.gif" width="1" height="1">
</form>
Forgot to fill in all settings for my Paypal Company account. Works fine now with above code.

PayPal Donation Button: Adding 'Amount' and 'Currency'

I have the "normal" PayPal donation button. I want to add two multiple choice fields: Amount and Currency as the image below. So the user dont need to put the amount of the PayPal website:
This is the 'normal paypal donation button code':
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XXXXXXXXXXXXX">
<input type="image" src="https://www.paypalobjects.com/es_ES/ES/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal.">
<img alt="" border="0" src="https://www.paypalobjects.com/es_ES/i/scr/pixel.gif" width="1" height="1">
</form>
I have read on this post that you have to add the following lines, but I dont know where or how to do it. It doesnt work.
<label for="amount">Select the amount you wish to donate:</label>
<select name="amount" id="amount">
<option value="5.00">$5.00</option>
<option value="25.00">$25.00</option>
<option value="50.00">$50.00</option>
</select>
Can anyone tell me how to do it correctly? Thanks!
Hosted PayPal buttons allow you to send option variables, but when not for a donation button, be sure that the option values (for drop downs / text boxes) match exactly what is saved in your PayPal account. i.e. do not edit drop down boxes PayPal creates for you.
As for adding drop down boxes / text boxes to a hosted button, perfectly possible, as long as they do not alter the payment amount. So, for creating a hosted donation button that allows you to edit the amount, I advise the following:
Create a buy now button on PayPal, adding the drop down boxes and/or text boxes you wish to add to your donation button. Create this button as if you were creating your donation button, because that is exactly what we will be doing, changing this button into a donation button.
Copy the the whole buy now button HTML code, paste into notepad, or an editor where you can use 'find and replace'.
Replace all occurances of 'buynow' with 'donate' (This usually just changes the image). Also, replace '_xclick' with '_donations'. (to tell PayPal how to generate the checkout page)
You now have a donation button
I had the similar problem, I solved it by the following steps:
Created a basic 'Buy Now' button (without any options or text fields, just the bare button), made sure i unchecked 'save button at PayPal' before clicking 'create button'.
Then After the button is created, and code is generated, clicked 'Remove code protection' on the top-right where the generated code is shown.
added one additional text input with name 'amount'
replaced value _xclick with _donations (on the input field with name='cmd')
the result is the following code, and it works for me (for now) (you need to add some validations though)
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="XXXXXXXXXXXXX">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Sample Name Here">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add special instructions to the seller:">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHosted">
<input type="hidden" name="on0" value="Donate">
<input type="text" name="amount" value="23.00">
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
Paypal has specific HTML data requirements when you post to their page.
The 'host_button_id' can only be used for one specific value and it's data that paypal holds on their site as a convenience to their clients.
In order to pass variable data you have to pass all the information they need. The 'host_button_id' is no longer needed.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="herschelgomez#xyzzyu.com">
<label for="amount">Select the amount you wish to donate:</label>
<select name="amount" id="amount">
<option value="5.00">$5.00</option>
<option value="25.00">$25.00</option>
<option value="50.00">$50.00</option>
</select><br/>
<label for="currency_code">Select the currency:</label>
<select name="currency_code" id="currency_code">
<option value="USD">USD</option>
<option value="GBP">GBP</option>
<option value="CAD">CAD</option>
</select><br/>
<input type="hidden" name="currency_code" value="USD">
<input type="image"
src="https://www.paypalobjects.com/es_ES/ES/i/btn/btn_donateCC_LG.gif" border="0"
name="submit" alt="PayPal.">
<img alt="" border="0" src="https://www.paypalobjects.com/es_ES/i/scr/pixel.gif"
width="1" height="1">
</form>
You can find more currency codes here: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_currency_codes
and more html info here: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_buynow_buttons#id08A2G0920QN
Also for the hidden 'cmd' I'm not sure if that will have to change to '_xclick' only. You'll have to test it out and see what works.
Please try this :
<head>
<title>Get Selected Item - DevCurry.com</title>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js">
</script>
<script type="text/javascript" language="javascript">
$(function () {
$('#ddl').change(function () {
$('#divone').text($(this).find(":selected").val());
});
});
</script>
</head>
<body>
<select id="ddl">
<option value="Tomatoes">Tomatoes</option>
<option value="Potatoes">Potatoes</option>
<option value="Onion">Onion</option>
<option value="Olives">Olives</option>
</select>
<br />
<div id="divone" />
<input type="hidden" id="txt" />
</body>
</html>

Paypal Subscription Modification

I was hoping someone could help regarding modifying a subscription price.
I have a social networking site In which you originally could subscribe to a standard or premium account which varied in what applications where active in your account.
My client now whats to scrap the 2 subscriptions and be able to give a choice of what applications the user wants to use and charge a subscription cost for the total cost for the applications specified.
I have a 'bolt-ons' page in which the user clicks a checkbox associated with each application, which then processes the payment and the IPN makes modifications to their account which works fine.
But when a user decides they want more or less applications and fills out the form again, I can't figure out how to modify their payment.
when I add the modify variable to the html form and continue the payment, it brings me to a radio form with other subscriptions from different projects.
I simply want to modify the total outgoings of the users payments. It is the user the process's the form, there is nothing illegitimate going off, just simply looking for the user to be able to change the subscription rate which depends on what applications they want active.
here's my html form:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"
style="margin:20px;">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="******************************" />
<input type="hidden" name="item_name" value="************************ Application Bolt-on's" />
<input type="hidden" name="return" value="http://www.***************.co.uk/?navigation=home">
<input type="hidden" name="cancel_return" value="http://www.***************.co.uk/?navigation=home">
<input type="hidden" name="item_number" value="1" />
<input type="hidden" name="currency_code" value="GBP" />
<?php
if( isset( $post['mod'] ) ) {
echo "<input type=\"hidden\" name=\"modify\" value=\"2\" />";
echo "<input type=\"hidden\" name=\"a3\" value=\"00.02\" />";
}else{
echo "<input type=\"hidden\" name=\"a3\" value=\"00.01\" />";
}
?>
<input type="hidden" name="p3" value="1" />
<input type="hidden" name="t3" value="M" />
<input type="hidden" name="src" value="1" />
<input type="hidden" name="sra" value="1" />
<input type="hidden" name="sra" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="custom" value="<?php echo $custom_str; ?>" />
<input type="image" src="https://www.paypal.com/en_US/GB/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
I have read many articles and non touch on this subject in a sense of whether it can or cannot be done so please don't send me links the the paypal site unless it is the exact answer which I may have missed.
Any help is much appreciated,
Regards,
Phil
Hate to give such a partial non-answer to your question, but I think the information you need might be in the following blog post http://talklikeaduck.denhaven2.com/2007/09/02/how-to-cure-the-paypal-subscription-blues (Link is broken, but left here for attribution purposes)
From that article:
Another complexity of PayPal
subscriptions is how to allow users to
modify subscriptions. In fact this is
where I came in on this particular web
site. They had been offering only
monthly subscriptions and wanted to
offer an annual subscription with a
discount. The key here is to ensure
that you tell PayPal that you are
modifying a subscription rather than
creating a new one. The PayPal
documentation describes the ‘modify’
attribute which is to be passed with
the subscription signup request post
to paypal. A value of ‘1’ for this
attribute indicates that it will
modify an existing subscription, or
create a new one if there is no
existing subscription. Don’t beleive
this. My initial testing with the
PayPal developer sandbox seemed to
indicate that this worked. In practice
though, once deployed, it always
seemed to create a new subscription,
which meant that when a user upgraded
a monthly subscription to an annual
one, she ended up with both.
The fix was to use a value of ‘2’ for
modify when the user had an existing
subscription, and not to use the
modify attribute at all otherwise.
The article is dated 2007 and I would be careful to trust it as a current reference, but it might be a good starting point.