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: Adds transaction initiation logic & Payments Manager - PayTM #6342

Merged
merged 3 commits into from
Aug 20, 2019

Conversation

mrsaicharan1
Copy link
Member

@mrsaicharan1 mrsaicharan1 commented Aug 10, 2019

Fixes #6341
Response Image
Screenshot 2019-08-12 at 12 46 22 PM

Short description of what this resolves:

This PR initiates the transaction to obtain the txn token to process the payments. This txn token will be utilized for further processing and confirmation of the transaction in the later stages.

Changes proposed in this pull request:

  • Adds PayTM payments manager Class
  • Adds a route which initiates the transaction by hitting the transaction API with the generated checksum
  • Adds checksum module from PayTM's official repo.

Checklist

  • I have read the Contribution & Best practices Guide and my PR follows them.
  • My branch is up-to-date with the Upstream development branch.
  • The unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All the functions created/modified in this PR contain relevant docstrings.

@auto-label auto-label bot added the feature label Aug 10, 2019
order = safe_query(db, Order, 'identifier', order_identifier, 'identifier')
paytmParams = dict()
# body parameters
paytm_params["body"] = {

Choose a reason for hiding this comment

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

undefined name 'paytm_params'

@mrsaicharan1 mrsaicharan1 changed the title feat: Adds transaction initiation logic & Payments Manager - PayTM [WIP]feat: Adds transaction initiation logic & Payments Manager - PayTM Aug 10, 2019
@auto-label auto-label bot removed the feature label Aug 10, 2019
"signature" : checksum
}

post_data = json.dumps(paytm_params)

Choose a reason for hiding this comment

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

undefined name 'json'
undefined name 'paytm_params'

@fossasia fossasia deleted a comment Aug 12, 2019
@fossasia fossasia deleted a comment Aug 12, 2019
@fossasia fossasia deleted a comment Aug 12, 2019
@fossasia fossasia deleted a comment Aug 12, 2019
@fossasia fossasia deleted a comment Aug 12, 2019
@fossasia fossasia deleted a comment Aug 12, 2019
@codecov
Copy link

codecov bot commented Aug 12, 2019

Codecov Report

Merging #6342 into development will decrease coverage by 0.26%.
The diff coverage is 27.45%.

Impacted file tree graph

@@              Coverage Diff               @@
##           development   #6342      +/-   ##
==============================================
- Coverage        65.16%   64.9%   -0.27%     
==============================================
  Files              287     288       +1     
  Lines            14810   14911     +101     
==============================================
+ Hits              9651    9678      +27     
- Misses            5159    5233      +74
Impacted Files Coverage Δ
app/api/schema/orders.py 89.06% <ø> (ø) ⬆️
app/api/helpers/checksum.py 24.67% <24.67%> (ø)
app/api/orders.py 27.77% <29.41%> (-0.14%) ⬇️
app/api/helpers/payment.py 25.17% <50%> (+1.47%) ⬆️

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 fcf5275...7a0c904. Read the comment docs.

@fossasia fossasia deleted a comment Aug 12, 2019
@fossasia fossasia deleted a comment Aug 12, 2019
@fossasia fossasia deleted a comment Aug 12, 2019
@fossasia fossasia deleted a comment Aug 12, 2019
@fossasia fossasia deleted a comment Aug 12, 2019
@mrsaicharan1 mrsaicharan1 force-pushed the paytm-workflow branch 2 times, most recently from 0a15fc0 to de840e1 Compare August 12, 2019 18:02
@fossasia fossasia deleted a comment Aug 12, 2019
@fossasia fossasia deleted a comment Aug 12, 2019
@fossasia fossasia deleted a comment Aug 12, 2019
@fossasia fossasia deleted a comment Aug 12, 2019
@mrsaicharan1 mrsaicharan1 force-pushed the paytm-workflow branch 5 times, most recently from 8f6aee6 to 93e7bab Compare August 13, 2019 04:51
@fossasia fossasia deleted a comment Aug 13, 2019
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.

@mrsaicharan1 add paytm as a valid payment_mode here -

"cheque", "onsite", "omise", "alipay"]),

@mrsaicharan1 mrsaicharan1 force-pushed the paytm-workflow branch 2 times, most recently from 35df768 to d38feb8 Compare August 17, 2019 05:34
feat: added checksum file from paytm

Added condition for sandbox & live

added paytm in schema choices
@fossasia fossasia deleted a comment Aug 17, 2019
@mrsaicharan1
Copy link
Member Author

@iamareebjamal Please review.

@fossasia fossasia deleted a comment Aug 20, 2019
@iamareebjamal iamareebjamal merged commit e06aef8 into fossasia:development Aug 20, 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 routes for initiating transactions with PayTM
5 participants