For years I have used a link to Paypal to let users purchase from our site:
https://www.paypal.com/xclick/business=[OURMAILADDRESS]&item_name=[ProductName]&amount=26%2e80&shipping=0%2e00&no_shipping=0&no_note=1&tax=0¤cy_code=EUR&lc=it&bn=PP%2dBuyNowBF&charset=UTF%2d8'
The link stopped working about 2 weeks ago.
I cannot find any info on the net about it being deprecated.
Can anyone shine some light on this topic?
It looks like paypal has removed support for the paypal.com/xclick links that they previously recommended using (in the Website Payments Standard Checkout Integration Guide pdf from 2006).
Change your link to:
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=...
For subscriptions, use:
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=...
The link you provided is not showing a 404 not found error. It goes to paypal's splash screen page. From there a user can sign in. The url is redirected towards https://www.paypal.com/home. Looks like you're had a function there that isn't working any longer. I haven't seen that before, but do have a possible solution.
If you want to provide users a way to buy with paypal on your site, a common (and not hard) method is in the html with a paypal code such as code you've created on paypal's website (under "settings" you can create a button and paste the code into your website) or by hand creating an html Form with Input fields yourself.
You're sending the data that would be in the Input fields that would show up in the Form $_GET action to paypal in the url. Paypal doesn't talk about handling data that way. Maybe whatever was allowing that to work unofficially,no longer does.
There's a lots of examples of how to create a paypal button html code on SO. I can post some if you'd like. This site tells the input fields that your url data can be created with: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
Here's an example:
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" >
<input type="hidden" name="cmd" value="_cart"> <!-- I'm using cart, you want to stick the buy now option value in here. -->
<input type="hidden" name="business" value="yoru business signon email">
<input type="hidden" name="lc" value="EUR">
<input type="hidden" name="item_name" value="Whats bought">
<input type="hidden" name="amount" value="15.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="products">
<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="rm" value="1">
<input type="hidden" name="shopping_url" value="http://www.yours.com/OnlinePayButtons.php">
<input type="hidden" name="add" value="1">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_SM.gif:NonHosted">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_SM.gif" border="0" name="submit">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height=".8">
</form>
You have to pick out of the link to html variables, what inputs you need in the form. This gives a structure and idea of what it looks like.
Related
I want to implement Wechat Pay and Alipay but I want to implement it with Hantepay.it is 3rd party agency called Hantepay. One benefit is that they actually support Alipay (as popular as Wechat Pay) at the same time. We can process payment through Wechat Pay and Alipay with one API.
This is a link to the detailed description document for referencing: http://139.199.112.175
How I can implement it in an ionic project.
first create your sandbox account from here
https://ezidebit.secure.force.com/online/SandboxRequest
from here you will get your secret key for testing
then make this form in your ionic app or over server side`
<form action="https://payments.handepay.co.uk/devtools/sigtest.php?
key=MySecretKey" method="POST">
<input type="hidden" name="action" value="SALE">
<input type="hidden" name="type" value="1">
<input type="hidden" name="currencyCode" value="826">
<input type="hidden" name="countryCode" value="826">
<input type="hidden" name="amount" value="2512">
<input type="hidden" name="transactionUnique" value="55f01b80eda38">
<input type="hidden" name="orderRef" value="Signature Test">
<input type="hidden" name="cardNumber" value="4929 4212 3460 0821">
<input type="hidden" name="cardExpiryDate" value="1213">
<input type="submit" value="Submit">
</form>
then call this form
your payment will done successfully
signature key is needed in production mode you have to go here to generate
Production mode
=======
the signature key the url is
https://payments.handepay.co.uk/devtools/sigtest.php?key=MySecretKey
<form action=" https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="paypalform" name="paypalform">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="abc#abc.com">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="currency_code" value="<?php echo $currency ?>">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="country" value="US">
<input type="hidden" name="return" value="http://abc-return.com">
<input type="hidden" name="cancel_return" value="http://abc-cancel.com">
<input type="hidden" name="item_name_1" value="Recharge">
<input type="hidden" name="item_number_1" value="<?php echo $user_id ?>">
<input type="hidden" name="amount_1" value="<?php echo $price ?>">
</form>
<script type="text/javascript">document.paypalform.submit();</script>
I'm using PayPal Payments Standard, via the HTML hidden name-value pair.
Payment was working great and smooth as butter until the 9th of this month, when things started getting worse. The return method rm = 2 was returning the post data to my return page before this date, but when I checked on 9th, the post data is not returning to my page.
I've spent more than a week and still can't figure out how could the same code works one day, and not the day afterwards.
I've implemented this method in my many other projects which could get me into trouble if the data is not posting back on my return page. Everything is just fine with my HTML forms, and I'm also receiving the payment on my PayPal Sandbox
The only issue is I'm not getting the post data on my return page.
Please help me resolve this.
Yes, I also confirm this issue. I am not certain if this is a Paypal change or a Paypal error - for it is difficult to find authoritative answers from them.
I also have a form that used to return POST data to the return url - however it recently stopped working and I was able to get it working again using GET method instead by following this helpful article.
However, this will require some changes to your IPN and success pages.
Curious to know how you solved your issue. Please update us.
Thanks for your update, however, I think there's some confusion here. The IPN url is called the notify_URL and that should receive the POSTed data back to verify the transaction. The Thank you page (or success page) is called the return url - which is where your AutoReturn takes you. I have always been receiving the POST data to my IPN page no problem AND the the POST data to my return URL. However, just in the last few weeks, the POST data stopped coming to my success (return) URL but there's no explanation as to why it would suddenly stop. Now, I can only receive GET data at my success/return page by turning on PDT. But it's OK - I re-wrote my thank you page script to use the GET variables instead. PayPal must have change this without there being any notification - very annoyed with them.
In my site I am integrating paypal buy now button programmatically.
this is what I have:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" style="margin-top: 30px;">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick" />
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="me#email.com" />
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="Your items." />
<input type="hidden" name="item_number" value='#Model.OrderId' />
<input type="hidden" name="amount" value='#Model.Total' />
<input type="hidden" name="currency_code" value="DKK" />
<!--Don't want any shipping address. -->
<input type="hidden" name="no_shipping" value="1"/>
<!-- Specify a URL for the payment confirmation page and a page that is displayed
if the user cancels a transaction. Also specify a URL that PayPal can post IPN
messages to (see explanation below). -->
<input type="hidden" name="return" value="http://example.com/Order/Complete/" />
<input type="hidden" name="cancel_return" value="http://example.com/Order/Cancel/" />
<input type="hidden" name="notify_url" value="" />
<!-- Do not prompt customers to include a note with their payment. -->
<input type="hidden" name="no_note" value="1" />
<!-- Display the payment button. -->
<input type="image" name="submit"
src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif"
alt="PayPal — The safer, easier way to pay online." />
<img src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif"
width="1" height="1" alt="" />
</form>
Now I have few questions that I didn't find any answer yet by googling and also I saw the paypal documentation but didn't really find anything :(
When I go to paypal site, it does not show the options to pay by credit card. It only shows payment option who have paypal account and option to create a new paypal account and pay. How do I make it show the option to pay by credit card??
In the paypal site at time of payment, it shows my email address. But I want to show my customer my business name not my email. How do I do that?
After I pay with my paypal account, it does not automatically redirect to my page even though I have a value in the 'return' field. Do I need to do anything else?
The option to allow buyers to pay with a credit card is only available to confirmed and verified PayPal accounts. The "business" value you provided above isn't linked to a PayPal account - it may not be the one you're using but it's the only information I have available at the moment.
There are some country restrictions for both the buyer and seller as well.
To show the business name you would need the "business" value to be a confirmed e-mail address linked to a Business PayPal account.
Just defining the "return" variable will not have buyers automatically returned to your site. You need to have Auto-Return enabled in the receivers account.
I want to automatically search a string at http://www.drugbank.ca/ and get the resulting URL (the search field is at the top of the page). The website can't be searched just by manipulating the URL. Is there a server-based way to do this? I want to create my own webpage with an input field and button to "Search DrugBank for X and get the URL".
Thanks.
You need to get the contents of:
http://www.drugbank.ca/search?query=searchstring
You can't do this with javascript it's not allowed by the browser to query sites of different domains (due to: http://en.wikipedia.org/wiki/Same_origin_policy).
I would do it with php and create a file like searchDrugBank.php:
<?php
$urlContent = file_get_contents('http://www.drugbank.ca/search?query=' . $_GET['q']);
// process $urlContent however you want
?>
And then you put on your site:
<form method="get" action="searchDrugBank.php">
<input type="text" name="q" />
<input type="submit" value="Search drugbank"/>
</form>
(Since you asked)
To find what URL I was gonna query I went to the site, and looked at the form that was submitted when I pressed search (look at the source, or in it's easy to do "inspect element" on for example the searchbox or searchbutton).
I find that the form is:
<form accept-charset="UTF-8" action="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"></div>
<strong>Search:</strong>
<input id="query" name="query" placeholder="Search DrugBank" size="30" type="search">
<input name="commit" type="submit" value="Search">
Help / Advanced
</form>
Which means that when you press search, exactly what happends is that you will do a GET request, since method="get" and get request means to ask for an url, and if parameters is required, they should be in the URL (http://en.wikipedia.org/wiki/Query_string#Web_forms).
The URL that will be queried is /search since action is action="/search" the rest of the url will then be built using provided parameters here it's just:
<input id="query" name="query" placeholder="Search DrugBank" size="30" type="search">
And there you can see that name of the parameter that should be provided to do a search, namely "query"!
I have setup my own custom form for mechanical turk and am posting to their external interface.
<form enctype="multipart/form-data" action="https://workersandbox.mturk.com/mturk/externalSubmit" method="post" name="mturk_form" id="mturk_form">
<p>
<label for="turk_task_image_image">Upload an image</label><br>
<input type="file" size="30" name="turk_task_image[image]" id="turk_task_image_image">
</p>
<b>- OR - </b><br><br>
<p>
<label for="turk_task_image_url">Specify an Image URL</label><br>
<input type="text" size="30" name="turk_task_image[url]" id="turk_task_image_url">
</p>
<p>
<label for="turk_task_image_description">Description (optional)</label><br>
<textarea rows="3" name="turk_task_image[description]" id="turk_task_image_description" cols="80"></textarea>
</p>
<input type="hidden" value="ASSIGNMENT_ID_NOT_AVAILABLE" name="assignmentId" id="assignmentId">
<input type="hidden" value="200" name="task[storyboard_location_id]" id="task_storyboard_location_id">
<input type="hidden" value="36" name="task[turk_task_id]" id="task_turk_task_id">
<p>
<input type="submit" value="You must ACCEPT the HIT before you can submit the results." name="commit" id="submitButton" disabled="">
<img border="0" style="display: none;" src="/images/spinner.gif?1274319066" id="spinner" alt="Spinner">
</p>
</form>
When I go to retrieve the responses, all of the text field values are available but the posted file is not. According to the API docs, I should receive another url that should make the uploaded file available for download?
How do I go about getting the url of the file that is posted to the externalSubmit interface?
P.S. On a side note, I am using the rturk gem to build up these HITs. But I see nothing in the code regarding the support for posted uploaded files.
From what I can gather from the developer forums, it doesn't look like the external interface supports file uploads.
I saw one thread where a developer thought that they were going to implement it in the future but that was in 2008.
Another thread where someone states that you must handle the uploading of the file to your server and the submission of the externalSubmit form separately.
http://solutions.amazonwebservices.com/connect/thread.jspa?messageID=125657𞫙
http://solutions.amazonwebservices.com/connect/thread.jspa?messageID=92072𖞨
http://solutions.amazonwebservices.com/connect/thread.jspa?messageID=97431𗲗
I'm currently exploring an AJAXy upload interface for the file upload along with a separate externalSubmit form for the image details.