diff --git a/omise/__init__.py b/omise/__init__.py index 2d7c4a6..2973b4d 100644 --- a/omise/__init__.py +++ b/omise/__init__.py @@ -1994,7 +1994,7 @@ class Source(_MainResource, Base): >>> source = omise.Source.create( amount=100000, currency='thb', - type='internet_banking_scb' + type='promptpay' ) >>> charge = omise.Charge.create( @@ -2013,7 +2013,7 @@ class Source(_MainResource, Base): amount=100000, currency='thb', source={ - 'type': 'internet_banking_scb' + 'type': 'promptpay' }, return_uri='https://www.omise.co' ) diff --git a/omise/test/test_charge.py b/omise/test/test_charge.py index 1351db0..2b47658 100644 --- a/omise/test/test_charge.py +++ b/omise/test/test_charge.py @@ -285,7 +285,7 @@ def test_create_with_source(self, api_call): "source": { "object": "source", "id": "src_test", - "type": "internet_banking_test", + "type": "promptpay", "flow": "redirect", "amount": 100000, "currency": "thb" @@ -320,7 +320,7 @@ def test_create_with_source(self, api_call): amount=100000, currency='thb', source={ - 'type': 'internet_banking_test' + 'type': 'promptpay' }, return_uri='http://www.google.com' ) @@ -337,7 +337,7 @@ def test_create_with_source(self, api_call): 'amount': 100000, 'currency': 'thb', 'source': { - 'type': 'internet_banking_test' + 'type': 'promptpay' }, 'return_uri': 'http://www.google.com' } diff --git a/omise/test/test_source.py b/omise/test/test_source.py index 7879cab..f515f36 100644 --- a/omise/test/test_source.py +++ b/omise/test/test_source.py @@ -14,7 +14,7 @@ def _makeOne(self): return self._getTargetClass().from_data({ 'object': 'source', 'id': 'src_test', - 'type': 'internet_banking_test', + 'type': 'promptpay', 'flow': 'redirect', 'amount': 100000, 'currency': 'thb' @@ -26,7 +26,7 @@ def test_create_offsite(self, api_call): self.mockResponse(api_call, """{ "object": "source", "id": "src_test", - "type": "internet_banking_test", + "type": "promptpay", "flow": "redirect", "amount": 100000, "currency": "thb" @@ -35,7 +35,7 @@ def test_create_offsite(self, api_call): source = class_.create( amount=100000, currency='thb', - type='internet_banking_test' + type='promptpay' ) self.assertTrue(isinstance(source, class_)) self.assertEqual(source.id, 'src_test') @@ -46,7 +46,7 @@ def test_create_offsite(self, api_call): { 'amount': 100000, 'currency': 'thb', - 'type': 'internet_banking_test' + 'type': 'promptpay' } ) @@ -86,7 +86,7 @@ def test_retrieve(self, api_call): self.mockResponse(api_call, """{ "object": "source", "id": "src_test", - "type": "internet_banking_test", + "type": "promptpay", "flow": "redirect", "amount": 100000, "currency": "thb" @@ -95,7 +95,7 @@ def test_retrieve(self, api_call): source = class_.retrieve('src_test') self.assertTrue(isinstance(source, class_)) self.assertEqual(source.id, 'src_test') - self.assertEqual(source.type, 'internet_banking_test') + self.assertEqual(source.type, 'promptpay') self.assertEqual(source.flow, 'redirect') self.assertEqual(source.amount, 100000) self.assertEqual(source.currency, 'thb')