2

I designed a Django web app and then I created an android webview, in android webview, all functions work properly in the Django web app, I am using a payment gateway.

Payment gateway working in all browsers but it's not working in the android web view.android webview its returning a forbidden(403) CSRF verification failed error.

<form action="{% url 'carts:checkout' %}" method="POST"> {% csrf_token %} 
  <script src="https://checkout.razorpay.com/v1/checkout.js"
          data-key="rbu_htgd76hsd5fwc" 
          data-amount="{{ object.total | multiply:100 }}" 
          data-currency="INR"
          data-buttontext="Pay Now"
          data-name="" 
          data-description="Test transaction"
          data-image="https://example.com/your_logo.jpg"
          data-prefill.name="{{ request.user.name }}"
          data-prefill.email="{{ request.user.email }}"
          data-prefill.contact="{{ request.user.mobile_no }}"
          data-prefill.order="{{ object.order_id }}"
          data-theme.color="#F37254">
  </script>
  <input type="hidden" custom="Hidden Element" name="hidden">
</form>
wokoro douye samuel
  • 2,194
  • 3
  • 15
  • 29

0 Answers0