Skip to content

Commit c9928fe

Browse files
author
brianmc
committed
Used random amount for automated running
1 parent 2067425 commit c9928fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

PaymentTransactions/capture-funds-authorized-through-another-channel.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import os, sys
22
import imp
3+
import random
34

45
from authorizenet import apicontractsv1
56
from authorizenet.apicontrollers import *
67
constants = imp.load_source('modulename', 'constants.py')
78
from decimal import *
89

910
def capture_funds_authorized_through_another_channel():
11+
12+
amount = str(round(random.random()*100, 2))
13+
1014
merchantAuth = apicontractsv1.merchantAuthenticationType()
1115
merchantAuth.name = constants.apiLoginId
1216
merchantAuth.transactionKey = constants.transactionKey
@@ -20,7 +24,7 @@ def capture_funds_authorized_through_another_channel():
2024

2125
transactionrequest = apicontractsv1.transactionRequestType()
2226
transactionrequest.transactionType = "captureOnlyTransaction"
23-
transactionrequest.amount = Decimal ('1.55')
27+
transactionrequest.amount = Decimal (amount)
2428
transactionrequest.payment = payment
2529
transactionrequest.authCode = "ROHNFQ"
2630

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