I'm trying to setup PayPal's Website Payments system on my website, where I'm selling services with no shipping!
I'd like to specify for PayPal Checkout to send the payment for me as not for Good, but for Services, so I won't get bound to ship something physical!
My code now: (It's sandbox now)
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="lc" value="en">
<input type="hidden" name="page_style" value="primary">
<input type="hidden" name="business" value="pp_1350857585_biz#zgmail.us">
<!-- <input type="hidden" name="notify_url" value=""> -->
<input type="hidden" name="item_name" value="TEST">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="amount" value="100">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="no_shipping" value="1">
<!-- <input type="hidden" name="return" value=""> -->
<!-- <input type="hidden" name="cancel_return" value=""> -->
<!-- <input type="hidden" name="custom" value=""> -->
<input type="image" style="width: 144px;" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_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">
What should I change?
Thanks in advance!
you need to add this setting L_PAYMENTREQUEST_n_ITEMCATEGORYm
From Paypal Docs:
Indicates whether an item is digital or physical. For digital goods, this field is required and must be set to Digital. You can specify up to 10 payments, where n is a digit between 0 and 9, inclusive, and m specifies the list item within the payment; except for digital goods, which only supports single payments. These parameters must be ordered sequentially beginning with 0 (for example L_PAYMENTREQUEST_n_ITEMCATEGORY0, L_PAYMENTREQUEST_n_ITEMCATEGORY1). It is one of the following values:
Digital
Physical
This field is available since version 65.1.
According to PayPal, it's not possible to mark item as service (or digital) in PayPal Website Standard API. That's possible in Paypal Express Checkout though, as Scott mentioned above.
Here is the quote of a PayPal representative's comment on this matter:
Unfortunately, PayPal Website Standard does not support Digital Goods.
You will have to use the Express Checkout in order to use the
L_PAYMENTREQUEST_n_ITEMCATEGORY='Digital' to set it as Digital Goods.
Related
I'm currently making automated tests for Browserstack using Selenium and Nightwatch.js. I've encountered a problem where I'm unable to submit a login form. Either nothing happens or the page just reloads. All required login data are set using browser.setValue('{selector}', '{value}'). Tried this on Chrome and Firefox, but the result is the same. I am able to submit the form using JS in browser console, though.
I've tried the following methods to no avail.
browser.submitForm('#login-form');
browser.click('#send2');
browser.execute("document.getElementById('send2').click();");
browser.execute("document.getElementById('login-form').submit();");
Is there anything that I'm missing? If that makes a difference, I'm trying to automate a login form for Magento 1 site.
Much thanks.
Edit:
Added form HTML
<form action="https://{site}/en/customer/account/loginPost/" method="post" id="login-form">
<input name="form_key" type="hidden" value="1CdZGL4mwA0njx3U">
<div class="form-group">
<input type="text" class="input-text-custom required-entry validate-email form-control" id="email" name="login[username]" value="" title="Insert Email Address" placeholder="Insert Email Address">
</div>
<div class="form-group">
<input type="password" class="input-text-custom required-entry form-control" id="pass" name="login[password]" title="Password" placeholder="Password">
</div>
<div class="form-group">
<input type="checkbox" name="nl_subscribe" id="nl_subscribe_existing" value="subscribe" class="form-control checkbox">
<label for="nl_subscribe_existing" class="text-normal-checkout"><span></span>By the way, I also want to subscribe to your newsletter*</label>
</div>
<input type="hidden" name="nl_source" value="customer_login" class="form-control checkbox">
<div class="form-group"><div class="control remember-me-box">
<div class="input-box">
<input type="checkbox" name="persistent_remember_me" class="checkbox" id="remember_meL0h6snrk30" title="Remember Me">
<label for="remember_meL0h6snrk30" class="text-normal-checkout"><span></span>Remember Me</label>
</div>
</div>
</div>
<div class="forgot-password">Forgot password?</div>
<div align="center"><button type="submit" class="button-check" name="send" id="send2" title="log in"><span><span>log in</span></span></button></div>
</form>
Edit 2:
Is it possible that this is related to configuration? I launched this test on local browser and then stopped it, so I could fill and submit the form manually, but I was not able to submit it anyway.
It appears that the script was fine but there was a bug in the site. For some reason, script needs to refresh the browser to be able to submit the form successfully. So, until this is fixed, I've implemented browser.execute('location.reload();'); as a workaround.
Hi – I'm looking for a simple script I can Copy&Paste into my website so I can start selling with BlueSnap's HPF fields.
The form should include the most basic elements needed to get the token back and charge the shopper, I'm not looking for any design, just functionality.
I have the basics - but I need to see how this would look like if it was done:
<form id="checkoutForm">
<div>
<label>Full Name:</label>
<input type="text" id="fullName">
</div>
<div>
<label>Card Number:</label>
<input type="text" id="cardNumber" data-bluesnap="ccn">
</div>
<div>
<label>Security Code:</label>
<input type="text" id="securityCode" data-bluesnap="cvv">
</div>
<div>
<label>Expiration Date (MM/YYYY):</label>
<input type="text" id="expirationDate" data-bluesnap="exp">
</div>
<button type="submit" id="buynowButton">Buy Now</button>
</form>
Can anyone help me with that?
In order to implement BlueSnap Hosted Payment fields all you need to do is
plnkr simple example link
Obtain the Hosted Payment Field token for the session
Add the BlueSnap JavaScript file to your checkout form
<script type="text/javascript" src="BLUESNAPDOMAINPATH/services/hosted-payment-fields/v2.0/bluesnap.hpf.min.js"></script>
Add the Hosted Payment Fields to your checkout form
<div data-bluesnap="ccn"></div>
<div data-bluesnap="exp"></div>
<div data-bluesnap="cvv"></div>
Add a script to initiate the Hosted Payment Fields with your Hosted Fields token
Add a script to submit credit card, expiration date and CVV data
I am new to payPal. I'd like to use a simple PayNow button on my site. The problem is that I would like my webUsers to enter any amount they want to pay on my site and have it transfer to payPal when the Pay button is clicked.
This option does not seem to be available in any of the button types. They require preset amounts or entering the amount on the PP site. Is my only option to dive into learning the API?
Thanks, Mike
This may be what you need:
<form name="input" target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="YOUR BUSINESS NAME">
<input type="hidden" name="item_name" value="ITEM NAME">
<input type="hidden" name="item_number" value="ITEM ID NUMBER">
Other amount: €<input type="text" maxlength="200" style="width:50px;" name="amount" value="5.00"> EUR<br />
<input type="hidden" name="currency_code" value="EUR">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_SM.gif" border="0" alt="PayPal - The safer, easier way to pay online!">
</form>
Change the value of the variable business to the receiver email, i.e.:
<input type="hidden" name="business" value="receiver#email.com">
You may want to read HTML Variables for PayPal Payments Standard - PayPal Developer
we are using paypal adaptive payments embedded solution so our buyers can stay on the site during checkout. we want to change the lightbox CSS. how can we do it? after looking at the PP adaptive payments API documentation all we could find was headerImageUrl. how do we changed the header logo? can the background be changed?
<form action="https://www.sandbox.paypal.com/webapps/adaptivepayment/flow/pay" target="PPDGFrame">
<input id="type" type="hidden" name="expType" value="light">
<input type="hidden" name="business" value="seller_1328179547_biz#complexintegrations.com">
<input type="hidden" name="shipping" value="5.00">
<input type="hidden" name="amount" value="6">
<input type="hidden" name="headerImageUrl" value="https://domainname.com/images/LOGO%20%281%29.png">
<input id="paykey" type="hidden" name="paykey" value="AP-4N0030004W852052F">
<input id="GetShippingAddresses" type="hidden" name="GetShippingAddresses" value="1">
<input type="image" src="https://www.paypal.com/en_US/i/bnr/bnr_MSPFbanner_ec2_143x32.gif" id="submitBtn" value="Pay with PayPal" style="height:22px;position:relative;top:5px;">
</form>
<script type="text/javascript" language="javascript">
var dgFlow = new PAYPAL.apps.DGFlow({ trigger: "submitBtn" });
</script>
You can't do this on the Lightbox.
There's unfortunately no way to customize it, beyond changing the width of it (And you have to manually hack the JS for that.)
I have index.php and I have a login form:
<form method=post action="login.php" id="login">
<input type="text" size="16" maxlength="30" name="login" id="login_user" />
<input type="password" name="pass" id="login_pass"/>
<input name="msubmit" type="submit" value="Login" />
</form>
How can I make sure that the form gets processed through a secure line?
Do I have to add https://?
<form method=post action="https://test.com/login.php" id="login"
Any ideas?
Thanks.
Yes, the best way is to specify https:
<form method="post" action="https://domain.com/login.php" id="login">
<input type="text" size="16" maxlength="30" name="login" id="login_user" />
<input type="password" name="pass" id="login_pass" />
<input name="msubmit" type="submit" value="Login" />
</form>
Even if index.php was served through a secure channel, it is good practice to explicitly specify https on the post action because this is the request which sends sensitive data over the wire. But it is also recommended to have index.php served through https only.
Use https protocol. Also treat all the parameters as tainted - and get the PHP script to process them in a responsible fashion.
*I.e. parse (regular expressions) them and escape them if necessary when using a database/command line *