Skip to content

Commit 7c78b6c

Browse files
committed
added sample code for getMerchantDetails
1 parent 10465d5 commit 7c78b6c

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import os, sys
2+
import imp
3+
import random
4+
5+
from authorizenet import apicontractsv1
6+
from authorizenet.apicontrollers import *
7+
constants = imp.load_source('modulename', 'constants.py')
8+
from decimal import *
9+
10+
def get_merchant_details():
11+
merchantAuth = apicontractsv1.merchantAuthenticationType()
12+
merchantAuth.name = constants.apiLoginId
13+
merchantAuth.transactionKey = constants.transactionKey
14+
15+
getMerchantDetailsRequest = apicontractsv1.getMerchantDetailsRequest()
16+
getMerchantDetailsRequest.merchantAuthentication = merchantAuth
17+
18+
controller = getMerchantDetailsController(getMerchantDetailsRequest)
19+
controller.execute()
20+
21+
response = controller.getresponse()
22+
23+
if response is not None:
24+
if response.messages.resultCode == "Ok":
25+
print "Merchant Name: ", response.merchantName
26+
print "Gateway ID: ", response.gatewayId
27+
print "Processors: ",
28+
for processor in response.processors.processor:
29+
print processor.name, "; ",
30+
else:
31+
print "Failed Transaction."
32+
else:
33+
print "Null Response."
34+
35+
return response
36+
37+
if(os.path.basename(__file__) == os.path.basename(sys.argv[0])):
38+
get_merchant_details()

list_of_sample_codes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ get_unsettled_transaction_list 1 0
5151
create_visa_checkout_transaction 1 0
5252
decrypt_visa_checkout_data 1 0
5353
get_customer_profile_ids 1 1
54+
get_merchant_details 0 1

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy