- @classmethod
- def get_payment_url(cls, schedule):
- return reverse('club_dummy_payment', args=[schedule.key])
+ def __init__(self, pos_id):
+ self.pos_id = pos_id
+
+ def initiate(self, request, schedule):
+ # Create Order at once.
+ from .models import PayUOrder
+ order = PayUOrder.objects.create(
+ pos_id=self.pos_id,
+ customer_ip=request.META['REMOTE_ADDR'],
+ schedule=schedule,
+ )
+ return order.put()