-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from nuhamozaini/manual_payment_feature
Manual Payment modifications
- Loading branch information
Showing
7 changed files
with
74 additions
and
6 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
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,16 @@ | ||
import moyasar | ||
import json | ||
|
||
|
||
class Capture: | ||
def capture_url(self, id): | ||
return f'{moyasar.resource_url(self.__class__.__name__)}/{id}/capture'.lower() | ||
|
||
def capture(self, amount=None): | ||
data = None | ||
if amount is not None: | ||
data = {'amount': amount} | ||
|
||
response = moyasar.request('POST', self.capture_url(self.id), data) | ||
response = json.loads(response.text) | ||
moyasar.fill_object(self, response) |
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,12 @@ | ||
import moyasar | ||
import json | ||
|
||
|
||
class Void: | ||
def void_url(self, id): | ||
return f'{moyasar.resource_url(self.__class__.__name__)}/{id}/void'.lower() | ||
|
||
def void(self): | ||
response = moyasar.request('POST', self.void_url(self.id)) | ||
response = json.loads(response.text) | ||
moyasar.fill_object(self, response) |
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
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 |
---|---|---|
|
@@ -28,5 +28,5 @@ six==1.12.0 | |
smmap2==2.0.5 | ||
stevedore==1.30.0 | ||
tornado==4.3 | ||
urllib3==1.24.1 | ||
urllib3==1.24.2 | ||
wrapt==1.11.1 |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
long_description = fh.read() | ||
setuptools.setup( | ||
name="moyasar", | ||
version="0.6.1", | ||
version="0.6.5", | ||
author="Moyasar", | ||
author_email="[email protected]", | ||
description="Moyasar Python language wrapper", | ||
|
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