Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Kunto
/
backoffice
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 36c01951
authored
Dec 23, 2019
by
yasir
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update penambahan field np_imid dan np_key pada form Partner
1 parent
ba563360
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
5 deletions
src/agratek/api/merchant/views/np/__init__.py
src/agratek/api/merchant/views/partner.py
src/agratek/api/merchant/views/np/__init__.py
View file @
36c0195
...
...
@@ -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
())
...
...
src/agratek/api/merchant/views/partner.py
View file @
36c0195
...
...
@@ -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
(),
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment