Beispiel #1
0
    def test_create_reseller_object_in_live(self):
        creation_ok = 1
        try:
            merchant = PkReseller(0, 'test api', 'test secret')
        except Exception:
            creation_ok = 0

        self.assertIs(creation_ok, 1)
Beispiel #2
0
from pakettikauppa.reseller import PkReseller

resel = PkReseller(1)

h_config = resel.get_api_config('update_customer')
print("Config: " + str(h_config))
print("\n")

customer_id = 128
h_update = {
    'name': 'Vilkas Group Oy (Test)',
    'business_id': '12345678-9',
    'customer_service_phone': '12369548',
}
resel.update_customer(customer_id, **h_update)
 def setUpClass(cls):
     cls.a_reseller = PkReseller(1)
     cls.logger = logging.getLogger(__name__)
Beispiel #4
0
from pakettikauppa.reseller import PkReseller

resel = PkReseller(1)

h_config = resel.get_api_config('create_customer')
print("Config: " + str(h_config))
print("\n")

_hInputData = {
    'name': 'Vilkas Group Oy (Test)',
    'business_id': '12345678-9',
    'payment_service_provider': '',
    'psp_merchant_id': '',
    'marketing_name': '',
    'street_address': 'Finlaysoninkuja 19',
    'post_office': 'Tampere',
    'postcode': '33210',
    'country': 'Finland',
    'phone': '+35812345A5',
    'email': '*****@*****.**',
    'contact_person_name': 'Porntip Härkönen',
    'contact_person_phone': '0123456789',
    'contact_person_email': '*****@*****.**',
    'customer_service_phone': '',
    'customer_service_email': '',
}
# resel.get_h_req_data(**_hInputData)

resel.create_customer(**_hInputData)
 def setUpClass(cls):
     cls._reseller = PkReseller(1)
 def setUpClass(cls):
     cls._reseller = PkReseller(1)
     cls.logger = logging.getLogger(__name__)
     cls.customer_id = 128
Beispiel #7
0
#!/usr/bin/env python

from pakettikauppa.reseller import PkReseller

resel = PkReseller(1)

h_config = resel.get_api_config('list_customer')
# h_config = resel.get_api_config('test')
print("Config: " + str(h_config))
print("\n")

resel.get_customer_list()
Beispiel #8
0
 def setUpClass(cls):
     cls._merchant = PkMerchant(1)
     cls._reseller = PkReseller(1)
Beispiel #9
0
 def test_empty_secret_key_reseller(self):
     with self.assertRaises(Exception):
         merchant = PkReseller(0, 'test', None)
Beispiel #10
0
 def test_empty_api_key_reseller(self):
     with self.assertRaises(Exception):
         merchant = PkReseller(0, None, 'test')