django-paypal を使用しようとしています https://github.com/johnboxall/django-paypal
def view_that_asks_for_money(request):
my_order = Order.objects.get(id=1)
# What you want the button to do.
paypal_dict = {
"business": "sampleemail@mail.com",
"amount": my_order.total_price,
"item_name": my_order.name,
"invoice": "unique-invoice-id",
"notify_url": "http://www.example.com/your-ipn-location/",
"return_url": "http://www.example.com/your-return-location/",
"cancel_return": "http://www.example.com/your-cancel-location/",
}
# Create the instance.
form = PayPalPaymentsForm(initial=paypal_dict)
context = {"form": form}
return render_to_response("payment.html", context)
ユーザーが支払いを行うときにfinished
フィールドを変更するにはどうすればよいですか?True
class Order(models.Model):
...
finished = models.BooleanField(default=False)
...