-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: Omise charge route and payment flow #6004
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
feat: Omise charge route and payment flow #6004
Conversation
| except TypeError: | ||
| return jsonify(status=False, error='Source object status error') | ||
|
|
||
| @order_misc_routes.route('/orders/<string:order_identifier>/omise-checkout', methods=['POST', 'GET']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected 2 blank lines, found 1
4d6de82 to
3de47d1
Compare
c723181 to
a971509
Compare
8efb0ca to
e198957
Compare
Codecov Report
@@ Coverage Diff @@
## development #6004 +/- ##
===============================================
- Coverage 66.26% 66.16% -0.11%
===============================================
Files 285 285
Lines 14007 14038 +31
===============================================
+ Hits 9282 9288 +6
- Misses 4725 4750 +25
Continue to review full report at Codecov.
|
e198957 to
bf1443d
Compare
| token = request.form.get("omiseToken") | ||
| try: | ||
| charge = OmisePaymentsManager.charge_payment(order_identifier, token) | ||
| except omise.errors.BaseError as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'omise'
| ) | ||
| return charge | ||
|
|
||
| class OmisePaymentsManager(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected 2 blank lines, found 1
29607d4 to
8ec6f20
Compare
| try: | ||
| charge = OmisePaymentsManager.charge_payment(order_identifier, token) | ||
| except omise.errors.BaseError as e: | ||
| logging.error(f"""OmiseError: {repr(e)}. See https://www.omise.co/api-errors""") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make the syntax python 3.6 compatible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upgrade your python please
e85220b to
bd16931
Compare
Umm, so if the order amount is 4.99 dollars, I only charge 4 dollars? Makes no sense actually |
8344c80 to
014da3b
Compare
b26aa65 to
159d70d
Compare
|
@iamareebjamal Please check. |
|
Peer Review First |
|
@uds5501 @shreyanshdwivedi Please review this. |
uds5501
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. just take down hound errors please
shreyanshdwivedi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There are no hound errors! :D |
|
@iamareebjamal Updated with dev branch rebase. Please merge this. |
Omise Addition requirements Shifted to payments module Final omise Round off amount Omise final
00901c3
5fbc0ac to
00901c3
Compare
Frontend: fossasia/open-event-frontend#3073**
Fixes #5823
Checklist
developmentbranch.Short description of what this resolves:
This creates a charge route for Omise which handles the details from FE, creates a charge object and authorises the payment. This gateway does not require redirection, therefore, can easily be integrated with the android app.
Changes proposed in this pull request: