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)
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__)
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
#!/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()
def setUpClass(cls): cls._merchant = PkMerchant(1) cls._reseller = PkReseller(1)
def test_empty_secret_key_reseller(self): with self.assertRaises(Exception): merchant = PkReseller(0, 'test', None)
def test_empty_api_key_reseller(self): with self.assertRaises(Exception): merchant = PkReseller(0, None, 'test')