title: How to handle callback data in flask
body: <p>I'm trying to do payment on my website through <a href="https://developer.paytm.com/docs/v1/payment-gateway" rel="nofollow noreferrer">paytm</a>. But I don't know how to handle its call back url in flask.
  Thank in advance.</p>
  
  <p>I've tried google for same many times.</p>
  
  <p>Here is my code:-</p>
  
  <pre><code>@app.route('/shop/',methods=['POST'])
  def shop():
      name=request.form['name']
      email=request.form['email']
      paytmno=request.form['paytmno']
      amount=request.form['amount']
      # password1=request.form['password1']
      # password2=request.form['password2']
      print(name,email,paytmno,amount)
      deepak_dict = {
  
                  'MID': MERCHANT_ID,
                  'ORDER_ID': str(12345),
                  'TXN_AMOUNT': str(amount),
                  'CUST_ID': email,
                  'INDUSTRY_TYPE_ID': 'Retail',
                  'WEBSITE': 'WEBSTAGING',
                  'CHANNEL_ID': 'WEB',
                  'CALLBACK_URL':'http://localhost:5000/shop/handlerequest/',
  
          }
      deepak_dict['CHECKSUMHASH'] = Checksum.generate_checksum(deepak_dict, MERCHANT_KEY)
      return render_template('payment/paytm.html', deepak_dict=deepak_dict)
  
  @app.route('/shop/handlerequest/',methods=['POST'])
  def shop_handlerequest():
      # what to do
      response_dict={}
      return render_template('payment/paytm_response.html',response=response_dict)
  </code></pre>
  
  <p>I want to read its call back data.</p>