diff options
| -rw-r--r-- | indoteknik_api/controllers/api_v1/midtrans.py | 8 | ||||
| -rw-r--r-- | indoteknik_custom/models/midtrans.py | 8 |
2 files changed, 15 insertions, 1 deletions
diff --git a/indoteknik_api/controllers/api_v1/midtrans.py b/indoteknik_api/controllers/api_v1/midtrans.py index a5e667cf..fdc801d3 100644 --- a/indoteknik_api/controllers/api_v1/midtrans.py +++ b/indoteknik_api/controllers/api_v1/midtrans.py @@ -32,3 +32,11 @@ class Midtrans(controller.Controller): 'json_raw': json_raw, }]) return + + @http.route(prefix + 'midtrans/payaccount', auth='none', type='json', csrf=False, cors='*', methods=['POST', 'OPTIONS']) + def payaccount(self, **kw): + json_raw = json.loads(request.httprequest.data) + request.env['midtrans.account'].create([{ + 'json_raw': json_raw, + }]) + return
\ No newline at end of file diff --git a/indoteknik_custom/models/midtrans.py b/indoteknik_custom/models/midtrans.py index 9546ff64..76dee447 100644 --- a/indoteknik_custom/models/midtrans.py +++ b/indoteknik_custom/models/midtrans.py @@ -29,4 +29,10 @@ class MidtransNotification(models.Model): class MidtransRecurring(models.Model): _name = 'midtrans.recurring' - json_raw = fields.Char(string='JSON Raw Text')
\ No newline at end of file + json_raw = fields.Char(string='JSON Raw Text') + + +class MidtransAccount(models.Model): + _name = 'midtrans.account' + + json_raw = fields.Char(string='JSON Raw Text') |
