0
votes

I'm using paypal's sandbox to test payments to a website i'm developing and I want the user to have the ability to pay directly with a credit card without the need of creating/using a paypal account.

What's happening is that the user only have this option when the United States option in country field is selected, otherwise the user has to pay with a paypal account.

When selected option is United States

When selected option is Portugal.

  • The account I'm using is from Portugal
  • I have the "PayPal Account Optional" feature on at my sandbox's account settings
  • The submit form is Buy Now type (aka _xclick)

Any idea why paypal is having this behavior?

I'm submiting this form:

<form name="paypalform" id="paypalform" action="@(paypalUrl)" method="post" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="currency_code" value="EUR">
    <input type="hidden" name="amount" value="99">
    <input type="hidden" name="item_name" value="@(itemName)"> 
    <input type="hidden" name="quantity" value="1">
    <input type="hidden" name="custom" value="@(Model.OrderId)"> <!--Transaction variable-->
    <input type="hidden" name="business" value="@(paypalId)">
    <input type="hidden" name="no_shipping" value="2">
</form>

The "@(...)" are just variables.

Thanks in advance.

2

2 Answers

0
votes

According to this thread (from www.TipsAndTricks-HQ.com), PayPal issued legal agreements a few years ago for certain countries which forbid guest checkout. Citizens in some countries can still do guest checkout, but, due to legal requirements, citizens in certain countries may be required to create a PayPal account before they can checkout.

I would venture to guess that this is due to the fact that PayPal is registered as a U.S. company. Because of this, they must abide by U.S. laws for financial institutions.

0
votes

What your trying to achieve can be done with paypals SDKs

You should try and use Paypals new SDK https://github.com/paypal?utf8=%E2%9C%93&query=sdk

With it you can take credit card payments, store credit card details within paypals vault (for later use), etc... without leaving your site.

This link is a sample from paypals github showing you how to do credit card payment https://github.com/paypal/PayPal-PHP-SDK/blob/master/sample/payments/CreatePayment.php

This is a tutoiral playlist that is really good and will help get you started https://www.youtube.com/watch?v=8ArEzyCEKl4&list=PLfdtiltiRHWE_c8jjW5OeweL1c_8uqcnW