-
Notifications
You must be signed in to change notification settings - Fork 29
Replacing auto checkout with manual #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mayanksinghal30
wants to merge
7
commits into
master
Choose a base branch
from
manual-checkout
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4455c7f
replacing auto checkout with manual
mayanksinghal30 1eaa7eb
updating the code
mayanksinghal30 e5d6cec
update
mayanksinghal30 90c2751
payment verification
mayanksinghal30 186fd29
Merge branch 'manual-checkout' of github.com:razorpay/razorpay-python…
mayanksinghal30 1995ebf
Update app.html
mayanksinghal30 57794e9
Update app.html
mayanksinghal30 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,68 @@ | ||
| <html> | ||
| <head lang="en"> | ||
| <meta charset="utf-8"> | ||
| <!DOCTYPE html> | ||
|
|
||
| <html xmlns="http://www.w3.org/1999/xhtml"> | ||
|
|
||
| <head runat="server"> | ||
| <title>Razorpay Python Sample App</title> | ||
| </head> | ||
|
|
||
| <body> | ||
| <form action="charge" method="POST"> | ||
| <script | ||
| src="https://checkout.razorpay.com/v1/checkout.js" | ||
| data-key="rzp_test_WyK93y9mvps7SN" | ||
| data-amount="5100" | ||
| data-name="Daft Punk" | ||
| data-description="Purchase Description" | ||
| data-image="vk.jpg" | ||
| data-netbanking="true" | ||
| data-description="Tron Legacy" | ||
| data-prefill.name="Harshil Mathur" | ||
| data-prefill.email="[email protected]" | ||
| data-prefill.contact="9999999999" | ||
| data-notes.shopping_order_id="21"> | ||
| </script> | ||
| <input type="hidden" name="shopping_order_id" value="21"> | ||
| <button id="rzp-button1">Pay with Razorpay</button> | ||
| <script src="https://checkout.razorpay.com/v1/checkout.js"></script> | ||
| <form action="charge" method="POST" name="razorpayForm"> | ||
| <input type="hidden" id="payment_id" name="razorpay_payment_id" /> | ||
| <input type="hidden" id="amount" name="amount" /> | ||
| </form> | ||
| <script> | ||
| // Checkout details as a json | ||
| var amount = 5100; | ||
| var options = { | ||
| 'key': '', // Add you key here | ||
| 'amount': amount, | ||
| "name": "DJ Tiesto", | ||
| "description": "Tron Legacy", | ||
| "image": "https://s29.postimg.org/r6dj1g85z/daft_punk.jpg", | ||
| "prefill": { | ||
| "name": "Daft Punk", | ||
| "email": "[email protected]", | ||
| "contact": "9999999999", | ||
| }, | ||
| "notes": { | ||
| "address": "Hello World", | ||
| "merchant_order_id": "12312321", | ||
| }, | ||
| "theme": { | ||
| "color": "#F37254" | ||
| } | ||
| } | ||
| /** | ||
| * The entire list of Checkout fields is available at | ||
| * https://docs.razorpay.com/docs/checkout-form#checkout-fields | ||
| */ | ||
| options.handler = function (response) { | ||
| document.getElementById('payment_id').value = response.razorpay_payment_id; | ||
| document.getElementById('amount').value = amount; | ||
| document.razorpayForm.submit(); | ||
| }; | ||
| // Boolean whether to show image inside a white frame. (default: true) | ||
| options.theme.image_padding = false; | ||
| options.modal = { | ||
| ondismiss: function () { | ||
| console.log("This code runs when the popup is closed"); | ||
| }, | ||
| // Boolean indicating whether pressing escape key | ||
| // should close the checkout form. (default: true) | ||
| escape: true, | ||
| // Boolean indicating whether clicking translucent blank | ||
| // space outside checkout form should close the form. (default: false) | ||
| backdropclose: false | ||
| }; | ||
| var rzp = new Razorpay(options); | ||
| document.getElementById('rzp-button1').onclick = function (e) { | ||
| rzp.open(); | ||
| e.preventDefault(); | ||
| } | ||
| </script> | ||
| </body> | ||
|
|
||
| </html> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.