This repository has been archived by the owner on Feb 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure package. Add flask adapter
- Loading branch information
1 parent
45ab068
commit fd73a0b
Showing
6 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
from payu.payu import PayU |
Empty file.
This file contains 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from payu import PayU as PayUBase | ||
|
||
class PayU(PayUBase): | ||
|
||
def __init__(self, app, **config): | ||
super(PayU, self).__init__(**config) | ||
self.app = app | ||
if app is not None: | ||
self.init_app(app) | ||
|
||
|
||
def init_app(self, app): | ||
for key, value in self.app.config.items(): | ||
if not key.startswith('PAYU_'): | ||
continue | ||
k = key.split('PAYU_')[-1] | ||
self.config[k] = value |
This file contains 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
File renamed without changes.
File renamed without changes.