Skip to content

Commit 5af4f64

Browse files
committed
Prevent None Batch ID
1 parent 6cf0b6c commit 5af4f64

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

paymentrails/payment_gateway.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def find(self, payment_id, batch_id):
2828
def create(self, body, batch_id):
2929
if body is None:
3030
raise InvalidFieldException("Body cannot be None.")
31+
elif batch_id is None:
32+
raise InvalidFieldException("Batch ID cannot be None.")
3133
endpoint = '/v1/batches/' + batch_id + '/payments/'
3234
response = paymentrails.configuration.Configuration.client(
3335
self.config).post(endpoint, body)

0 commit comments

Comments
 (0)