DEV Community

Cover image for All format testing (local testing)
testacc127000
testacc127000

Posted on

3 2

All format testing (local testing)

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.

Uploading a File

There are three ways you can upload a file:

  • From an Object instance

  • From a Bucket instance

  • From the client

In each case, you have to provide the Filename, which is the path of the file you want to upload. You’ll now explore the three alternatives. Feel free to pick whichever you like most to upload the first_file_name to S3.

@app.action("submit_your_response")
def submit_response(ack, body, client, logger):
    reference_id = body["actions"][0]["value"]
    # form_data = SlackForm.objects.filter(reference_id=reference_id).first()
    form_data = form_data_2
    form_view = utils.get_form_view_data(form_data)
    form_view["private_metadata"] = reference_id
    try:
        ack()
        result = client.views_open(trigger_id=body["trigger_id"], view=form_view)
        logger.info("User clicked submit button")
    except Exception as e:
        logger.error(e)
Enter fullscreen mode Exit fullscreen mode

https://gist.github.com/Nishant127/13898538d35a024b4d93a592b1b4a6ea

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay