Skip to content

Commit ce4b1d6

Browse files
author
brianmc
committed
Added GetSubscription Sample
1 parent 3ec2128 commit ce4b1d6

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from authorizenet import apicontractsv1
2+
from authorizenet.apicontrollers import *
3+
from decimal import *
4+
5+
merchantAuth = apicontractsv1.merchantAuthenticationType()
6+
merchantAuth.name = '5KP3u95bQpv'
7+
merchantAuth.transactionKey = '4Ktq966gC55GAX7S'
8+
9+
10+
getSubscription = apicontractsv1.ARBGetSubscriptionRequest()
11+
getSubscription.merchantAuthentication = merchantAuth
12+
getSubscription.subscriptionId = "2260421"
13+
14+
getSubscriptionController = ARBGetSubscriptionController(getSubscription)
15+
getSubscriptionController.execute()
16+
17+
response = getSubscriptionController.getresponse()
18+
19+
if (response.messages.resultCode=="Ok"):
20+
print "Subscription Name : %s" % response.subscription.name
21+
else:
22+
print "response code: %s" % response.messages.resultCode

0 commit comments

Comments
 (0)