Commit 36c01951 by yasir

update penambahan field np_imid dan np_key pada form Partner

1 parent ba563360
......@@ -20,11 +20,23 @@ class Vendor(VendorClass): # VendorClass
self.v_produk_kd = vendor_produk.kode
self.bank_cd, self.pay_method = self.v_produk_kd.split('-')
self.mid = 'np_mid' in settings and settings['np_mid'] or None
print('partner imid >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
print()
np_imid = self.invoice_det.partner.np_imid
np_key = self.invoice_det.partner.np_key
if not np_imid:
np_imid = 'np_mid' in settings and settings['np_mid'] or None
if not np_key:
np_key = self.key = 'np_key' in settings and settings['np_key'] or None
self.mid = np_imid
self.key = np_key
if self.pay_method == '06' and 'np_loan_mid' in settings and settings['np_loan_mid']:
self.mid = settings['np_loan_mid']
self.key = 'np_key' in settings and settings['np_key'] or None
self.url = 'np_url' in settings and settings['np_url'] or None
self.callback_url = "{}/api/vendor/np/callback".format(get_host())
self.notify_url = "{}/api/vendor/np/notify".format(get_host())
......
......@@ -37,7 +37,7 @@ class AddSchema(colander.Schema):
colander.String(),
validator=colander.Length(max=32),
oid="kode",
title="Nomor Identitas")
title="Kode")
nama = colander.SchemaNode(
colander.String(),
oid="nama")
......@@ -82,7 +82,8 @@ class AddSchema(colander.Schema):
website = colander.SchemaNode(
colander.String(),
missing=colander.drop,
oid="nik")
oid="nik",
title="Notif Callback URL")
is_vendor = colander.SchemaNode(
colander.Boolean(),
oid="is_vendor",
......@@ -100,6 +101,19 @@ class AddSchema(colander.Schema):
widget=deferred_user,
oid="status")
np_imid = colander.SchemaNode(
colander.String(),
oid="np_imid",
missing=colander.drop,
title="NicePay iMID"
)
np_key = colander.SchemaNode(
colander.String(),
oid="np_key",
missing=colander.drop,
title="NicePay Key"
)
class EditSchema(AddSchema):
id = colander.SchemaNode(colander.String(),
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!