I am running django-paypal program; however, it is not returning IPN’s into the admin models table. My site is public facing so I don’t need ngrok. I can see the transactions leaving the customer test account and showing up in the business test account with no issues on the pyapal ledger side.
Here is my views.py
(venv) root@ubuntu-s-1vcpu-512mb-10gb-sfo3-01:~/cquence/djangopaypal# cat views.py
import uuid
from django.contrib import messages
from django.shortcuts import render, redirect
from django.urls import reverse
from paypal.standard.forms import PayPalPaymentsForm
from django.conf import settings
from .models import Order
def checkout(request):
#if request.POST:
paypal_dict = {
'business': 'business@cquence.com',
'amount': '1.00',
'item_name': 'JIUJITSU REGISTRATION',
'no_shipping': '2',
'invoice': str(uuid.uuid4()),
'currency_code': 'USD',
'notify_url': request.build_absolute_uri(reverse("paypal-ipn")),
'return_url': request.build_absolute_uri(reverse("payment-success")),
'cancel_return': request.build_absolute_uri(reverse("payment-failed")),
}
# Create the instance.
form = PayPalPaymentsForm(initial=paypal_dict)
context = {"form": form}
return render(request, "payment.html", context)
def paymentSuccessful(request):
print("success")
messages.success(request, 'Payment was successful')
return render(request, 'payment-success.html')
def paymentFailed(request):
print("failed")
messages.error(request, 'Payment Failed')
return render(request, 'payment-failed.html')
Payments leaving the personal sandbox
Payments incoming into the business sandbox
The admin page shows no IPN’s coming in