Django
Installation
Create Payment model
to create a payment model you need to extend one of the following classes AbstractPayment
, AnonymPayment
, AnonymPayment
.
CreatePaymentView
you can create a new Payment using CreatePaymentView
, this class extends from CreateView
Example
PaymentConfirmationView
if you want to confirme payment you can use PaymentConfirmationView
view, this view responsable for reciving payment confirmation from third party.
PaymentObjectStatusView, Or PaymentObjectDoneView
to check payment status you can use PaymentObjectStatusView
, Or PaymentObjectDoneView
check the doc to see dirence
Example
FakePayment
if you are working in Devlopment
mode you can use FakePaymentView
all you need to do is to create a view and extend this class and add FakePaymentMixin
, to Payment
model
Example
Result
we now can CREATE, UPDATE and READ payment using this few lines of code.
Note: you still have to configure settings, and urls.py