Razorpay payment DJANGO

testacc127000

testacc127000

Posted on March 4, 2022

Razorpay payment DJANGO

Steps to integrate Razorpay

  • Setting up Razorpay account.

  • Storing API keys in settings.py

  • Installing Razorpay library.

  • Creating order using Razorpay API.

  • Creating order at backend and also creating Razorpay order.

    • Show template
    • render to payment.html
    • Get info of call back URL
    • Done with creating an order.
  • Making payment.

  • Handling payment success and failure.

    • Razorpay makes a post request
    • with the help of that handling success/failure
    • Done with payment.
    • Final checks for all platforms
    • Final checking

https://gist.github.com/Nishant127/ed0e02cfb0ae0da3fb82f17b21252ca4

def get_image_urls(cls, markdown):
        regex = r"!\[.?]\((https.*?)\)"
        urls = re.findall(regex, markdown)
        for url in urls:
            img_data = requests.get(url).content
            with tempfile.NamedTemporaryFile(suffix=".png") as image:
                image.write(img_data)
                upload_file_to_bucket(image.name)
                url = create_file_upload_url(image.name)
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
testacc127000
testacc127000

Posted on March 4, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related