Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Added Ordertypes
  • Loading branch information
sliemen committed Jun 20, 2019
1 parent 032ef1a commit cc9f45b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
6 changes: 4 additions & 2 deletions multisafepay/client.py
@@ -1,8 +1,9 @@
from multisafepay.resources.orders import Orders
from multisafepay.objects.paymentmethod import PaymentMethod
from multisafepay.objects.issuers import Issuer
from multisafepay.resources.gateways import Gateways
from multisafepay.resources.ideal_issuers import Issuers
from multisafepay.objects.paymentmethod import PaymentMethod
from multisafepay.objects.issuers import Issuer
from multisafepay.objects.ordertype import OrderType
import requests
import json

Expand All @@ -14,6 +15,7 @@ def __init__(self, modus=None, api_key=None):
self.api_key = api_key
self.paymentmethod = PaymentMethod
self.issuer = Issuer
self.ordertype = OrderType
self.order = Orders(self)
self.gateways = Gateways(self)
self.ideal_issuers = Issuers(self)
Expand Down
2 changes: 1 addition & 1 deletion multisafepay/examples/create_direct_order.py
Expand Up @@ -8,7 +8,7 @@
# 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",
"type": msp_client.ordertype.REDIRECT,
"order_id": "My-order-id-5",
"currency": "EUR",
"amount": 1000,
Expand Down
2 changes: 1 addition & 1 deletion multisafepay/examples/create_order.py
Expand Up @@ -7,7 +7,7 @@

# The following code will create a iDEAL order
print(msp_client.order.create({
"type": "redirect",
"type": msp_client.ordertype.REDIRECT,
"order_id": "my-order-id-1",
"gateway": msp_client.paymentmethod.IDEAL,
"currency": "EUR",
Expand Down
8 changes: 8 additions & 0 deletions multisafepay/objects/ordertype.py
@@ -0,0 +1,8 @@
class OrderType:
REDIRECT = 'redirect'
DIRECT = 'direct'
CHECKOUT = 'checkout'
PAYMENTLINK = 'paymentlink'



0 comments on commit cc9f45b

Please sign in to comment.