Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added issuers and direct order examples - Added Payafter to paymentmethod
- Loading branch information
1 parent
6a34c46
commit 032ef1a
Showing
6 changed files
with
71 additions
and
1 deletion.
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,27 @@ | ||
from multisafepay.client import Client | ||
|
||
msp_client = Client() | ||
# Here you can set the mode to TEST or LIVE based on the API you want to use | ||
msp_client.set_modus('TEST') | ||
msp_client.set_api_key('REPLACE WITH API KEY') | ||
|
||
# The following code will create a iDEAL order with ING as issuer | ||
# Issuers can only be used with iDEAL | ||
print(msp_client.order.create({ | ||
"type": "direct", | ||
"order_id": "My-order-id-5", | ||
"currency": "EUR", | ||
"amount": 1000, | ||
"gateway": msp_client.paymentmethod.IDEAL, | ||
"description": "product description", | ||
"gateway_info": { | ||
"issuer_id": msp_client.issuer.ING | ||
}, | ||
"payment_options": { | ||
"notification_url": "http://www.example.com/client/notification?type=notification", | ||
"redirect_url": "http://www.example.com/client/notification?type=redirect", | ||
"cancel_url": "http://www.example.com/client/notification?type=cancel", | ||
"close_window": False | ||
} | ||
})) | ||
|
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,8 @@ | ||
from multisafepay.client import Client | ||
|
||
msp_client = Client() | ||
# Here you can set the mode to TEST or LIVE based on the API you want to use | ||
msp_client.set_modus('TEST') | ||
msp_client.set_api_key('REPLACE WITH API KEY') | ||
# To retrieve a list of all the iDEAL issuers you can use the following example | ||
print(msp_client.ideal_issuers.get()) |
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,20 @@ | ||
class Issuer: | ||
|
||
TESTBANK = '3151' | ||
ABNAMRO = '0031' | ||
SNSBANK = '0751' | ||
ING = '0721' | ||
RABOBANK = '0021' | ||
ASNBANK = '0761' | ||
REGIOBANK = '0771' | ||
TRIODOSBANK = '0511' | ||
LANSCHOT = '0161' | ||
KNAB = '0801' | ||
BUNQ = '4371' | ||
MONEYOU = '1234' | ||
HANDELSBANKEN = '1235' | ||
|
||
|
||
|
||
|
||
|
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,10 @@ | ||
class Issuers: | ||
def __init__(self, client): | ||
self.endpoint = 'issuers/ideal' | ||
self.msp_client = client | ||
self.method = 'GET' | ||
|
||
def get(self): | ||
endpoint = '{0}'.format(self.endpoint) | ||
return self.msp_client.execute_http_call(self.method, endpoint) | ||
|