Paypal in Jquery Mobile

This project received 7 bids from talented freelancers with an average bid price of $36 USD / hour.

Get free quotes for a project like this
Employer working
Project Budget
Total Bids
Project Description


I have a Jquery mobile application that runs from the homescreen (apple-mobile-web-app-capable). I have integrated paypal, but it opens in safari half way through the payment process. I either need it to stay in one window all the way, or open in a new window at the start of the payment process.

I have tried all combinations of target="_blank", rel="external", and tried onclick to submit. Nothing works. It opens up the first part in the app, and then the second part in safari, which produces 'session timed out'.

I had a possible fix for this problem, by putting all paypal variables into a hyperlink. But this isn't working either. Please see below:


I have a the following paypal form within Jquery Mobile:

<input type="hidden" name="business" value="" />

<input type="hidden" name="invoice" value="" />
<input type="hidden" name="custom" value="" />

<input type="hidden" name="notify_url" value="/[url removed, login to view]" />
<input type="hidden" name="return" value="/" />



I need to submit my paypal cart via a url rather than a submit button. This is because I am doing some things with an app that require it to be a URL. I have got this far, but it just says 'empty cart' when I click the link:

'currency_code' => 'GBP',
'business' => get_bloginfo('admin_email'),
'upload' => '1',
'invoice' => SESSION_ID,
'custom' => $user_id,
'notify_url' => get_bloginfo("siteurl"),
'return' => get_bloginfo("siteurl"),
'rm' => '2',
'charset' => 'utf-8'

$encoded_params = array();

foreach ($params as $k => $v){

$encoded_params[] = $k.'='.urlencode($v);
echo "submit";


Can anyone help fix my issue whilst maintaining a standard URL link and not a submit button?


Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online