Skip to content
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: Transaction Processing logic & Wallet linking implementation #6399

Merged
merged 4 commits into from
Aug 23, 2019

Conversation

mrsaicharan1
Copy link
Member

@mrsaicharan1 mrsaicharan1 commented Aug 20, 2019

Fixes #6247
Fixes #6353

Short description of what this resolves:

This PR aims to fetch the payment options available for a particular order, validate one-time passwords and process the transactions.

Changes proposed in this pull request:

  • Add URL helper methods to Payments Manager
  • Added logic for processing transactions
  • Send & validate one-time passwords - Route Logic

@auto-label auto-label bot added the feature label Aug 20, 2019
@codecov
Copy link

codecov bot commented Aug 20, 2019

Codecov Report

Merging #6399 into development will decrease coverage by 0.15%.
The diff coverage is 25.42%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #6399      +/-   ##
===============================================
- Coverage         64.9%   64.74%   -0.16%     
===============================================
  Files              288      288              
  Lines            14912    14966      +54     
===============================================
+ Hits              9678     9690      +12     
- Misses            5234     5276      +42
Impacted Files Coverage Δ
app/api/orders.py 27.15% <25%> (-0.63%) ⬇️
app/api/helpers/payment.py 24.84% <26.66%> (-0.16%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a408e39...8c98f26. Read the comment docs.

response = requests.post(url, data=post_data, headers={"Content-type": "application/json"})
return response.json()

@order_misc_routes.route('/orders/<string:order_identifier>/paytm/fetch-payment-options/<string:txn_token>')

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

else:
url = "https://securegw.paytm.in/theia/api/v1/" # for production
return url
@staticmethod

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expected 1 blank line, found 0

@fossasia fossasia deleted a comment Aug 20, 2019
@fossasia fossasia deleted a comment Aug 20, 2019
@fossasia fossasia deleted a comment Aug 20, 2019
@fossasia fossasia deleted a comment Aug 20, 2019
@fossasia fossasia deleted a comment Aug 20, 2019
@mrsaicharan1 mrsaicharan1 force-pushed the paytm-final branch 2 times, most recently from 5b655c5 to ebe9502 Compare August 20, 2019 16:31
@fossasia fossasia deleted a comment Aug 20, 2019
@fossasia fossasia deleted a comment Aug 20, 2019
@fossasia fossasia deleted a comment Aug 20, 2019
@fossasia fossasia deleted a comment Aug 20, 2019
@fossasia fossasia deleted a comment Aug 21, 2019
@fossasia fossasia deleted a comment Aug 21, 2019
@fossasia fossasia deleted a comment Aug 21, 2019
@fossasia fossasia deleted a comment Aug 21, 2019
@fossasia fossasia deleted a comment Aug 21, 2019
@fossasia fossasia deleted a comment Aug 21, 2019
@fossasia fossasia deleted a comment Aug 21, 2019
@fossasia fossasia deleted a comment Aug 21, 2019
@fossasia fossasia deleted a comment Aug 21, 2019
@fossasia fossasia deleted a comment Aug 21, 2019
@fossasia fossasia deleted a comment Aug 21, 2019
@mrsaicharan1 mrsaicharan1 marked this pull request as ready for review August 21, 2019 10:26
@mrsaicharan1 mrsaicharan1 changed the title feat: Logic for transaction process & code validation for paytm feat: Transaction Processing logic & Wallet linking implementation Aug 21, 2019
@mrsaicharan1
Copy link
Member Author

@shreyanshdwivedi @uds5501 This is now ready for a review. Let's speed this up so that we can link it with the frontend pipeline.

@mrsaicharan1 mrsaicharan1 force-pushed the paytm-final branch 2 times, most recently from dd3ba93 to 859da6b Compare August 21, 2019 11:48
Copy link
Member

@shreyanshdwivedi shreyanshdwivedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the bin file isn't necessary here. Please remove it

Copy link
Contributor

@uds5501 uds5501 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks okay, but take care of extra files being added

@mrsaicharan1
Copy link
Member Author

@shreyanshdwivedi @uds5501 I've made the requested changes. Please have a look now.

uds5501
uds5501 previously approved these changes Aug 22, 2019
@uds5501 uds5501 self-requested a review August 22, 2019 19:50
@mrsaicharan1
Copy link
Member Author

@uds5501 @shreyanshdwivedi I've made the requested changes. This is ready for another review.

@mrsaicharan1
Copy link
Member Author

I've also added the JWT decorator to ensure proper routing based on authentication.

Copy link
Member

@shreyanshdwivedi shreyanshdwivedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked on the postman, working fine 👍
Will add the last API in my PR

@uds5501 uds5501 merged commit 23d0b57 into fossasia:development Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement functions to process payTM transaction Implementation of PayTM Payment Gateway
4 participants