Django-paypal form is not showing "pay with credit or debit card" option
I am using django-paypal package to integrate PayPal to my django site. All works fine but there is a problem. The PayPalPaymentsForm
is not showing "pay with credit or debit card" option. User can pay only with PayPal account.
I am using the next code to render the payment form:
def process_payment(request):
price = request.GET.get("price") or 0
paypal_dict = {
'business': settings.PAYPAL_RECEIVER_EMAIL,
'amount': str(price),
'item_name': 'refill amount',
'item_number': str(request.user.id),
'invoice': get_timestamp_uid(request.user.id),
'currency_code': 'USD',
'notify_url': f'{BASE_URL}{reverse("paypal-ipn")}',
'return_url': f'{BASE_URL}{reverse("paypal_payment:success_payment")}',
'cancel_return': f'{BASE_URL}{reverse("accounts:user-profile")}',
}
form = PayPalPaymentsForm(initial=paypal_dict)
context = {
'form': form
}
return render(request, 'paypal_payment/process_payment.html', context)
The result is demonstrated below:
But I want to have a form with credit/debit card option as is showed below:
So, what can I do in this situation? I have also tried to set to "On" the option "Website Payment Preferences -> PayPal Account Optional" in my PayPal sendbox account but it hasn't helped.
Once on a paypal.com checkout page, the option to pay with a debit card is never guaranteed. It depends on many factors, including the IP and geographic location of the payer, among other things.
For a guaranteed option to pay with a credit or debit card, use the current standard integration instead of that (very old) django-paypal form. Today's standard integration will show a black button on your site.