Skip to content

Commit 225303a

Browse files
Add more fields to the verify response.
1 parent e765785 commit 225303a

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

rave_python/rave_card.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ def _handleVerifyResponse(self, response, txRef):
100100
chargemessage = responseJson["data"]["chargemessage"]
101101
chargecode = responseJson["data"]["chargecode"]
102102
currency = responseJson["data"]["currency"]
103+
paymenttype = responseJson["data"]["paymenttype"]
104+
custname = responseJson["data"]["custname"]
105+
custemail = responseJson["data"]["custemail"]
106+
custphone = responseJson["data"]["custphone"]
103107
meta = responseJson["data"]["meta"]
104108

105109
# Check if the call returned something other than a 200
@@ -123,6 +127,10 @@ def _handleVerifyResponse(self, response, txRef):
123127
"chargemessage": chargemessage,
124128
"chargecode": chargecode,
125129
"currency": currency,
130+
"paymenttype": paymenttype,
131+
"custname": custname,
132+
"custemail": custemail,
133+
"custphone": custphone,
126134
"meta": meta}
127135

128136
else:
@@ -138,6 +146,10 @@ def _handleVerifyResponse(self, response, txRef):
138146
"chargemessage": chargemessage,
139147
"chargecode": chargecode,
140148
"currency": currency,
149+
"paymenttype": paymenttype,
150+
"custname": custname,
151+
"custemail": custemail,
152+
"custphone": custphone,
141153
"meta": meta}
142154

143155
# Charge card function

rave_python/rave_payment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ def _handleVerifyResponse(self, response, txRef):
196196
responseJson = res["json"]
197197
# retrieve necessary properties from response
198198
verify_response["status"] = responseJson['status']
199-
verify_response['flwRef'], verify_response["txRef"], verify_response["vbvcode"], verify_response["vbvmessage"], verify_response["acctmessage"], verify_response["currency"], verify_response["chargecode"], verify_response["amount"], verify_response[
200-
"chargedamount"], verify_response["chargemessage"], verify_response["meta"] = Payment.retrieve(responseJson['data'], "flwref", "txref", "vbvcode", "vbvmessage", "acctmessage", "currency", "chargecode", "amount", "chargedamount", "chargemessage", "meta")
199+
verify_response['flwRef'], verify_response["txRef"], verify_response["vbvcode"], verify_response["vbvmessage"], verify_response["acctmessage"], verify_response["currency"], verify_response["paymenttype"], verify_response["chargecode"], verify_response["amount"], verify_response[
200+
"chargedamount"], verify_response["chargemessage"], verify_response["custname"], verify_response["custemail"], verify_response["custphone"], verify_response["meta"] = Payment.retrieve(responseJson['data'], "flwref", "txref", "vbvcode", "vbvmessage", "acctmessage", "currency", "paymenttype", "chargecode", "amount", "chargedamount", "chargemessage", "custname", "custemail", "custphone", "meta")
201201

202202
# Check if the chargecode is 00
203203
if verify_response['chargecode'] == "00":

0 commit comments

Comments
 (0)