Skip to content

Commit 66ce20b

Browse files
author
zhaque
committed
Added sample code for ARBGetSubscriptionStatus
1 parent a0983d4 commit 66ce20b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from authorizenet import apicontractsv1
2+
from authorizenet.apicontrollers import *
3+
# Setting the mercahnt details
4+
merchantAuth = apicontractsv1.merchantAuthenticationType()
5+
merchantAuth.name = '5KP3u95bQpv'
6+
merchantAuth.transactionKey = '4Ktq966gC55GAX7S'
7+
# Seeting the request
8+
request = apicontractsv1.ARBGetSubscriptionStatusRequest()
9+
request.merchantAuthentication = merchantAuth
10+
request.refId = "Sample"
11+
request.subscriptionId = "294541"
12+
# Executing the controller
13+
controller = ARBGetSubscriptionStatusController(request)
14+
controller.execute()
15+
# Getting the response
16+
response = controller.getresponse()
17+
18+
if (response.messages.resultCode=="Ok"):
19+
print "SUCCESS:"
20+
print "Message Code : %s" % response.messages.message[0].code
21+
print "Message text : %s" % response.messages.message[0].text
22+
print "Subscription Status : %s" % response.status
23+
else:
24+
print "ERROR:"
25+
print "Message Code : %s" % response.messages.message[0].code
26+
print "Message text : %s" % response.messages.message[0].text

0 commit comments

Comments
 (0)