cancel
Showing results for 
Search instead for 
Did you mean: 

Python: Charge-Credit-Card using Nonce from Accept.JS

Hi All,

I am looking for an example or some guidance on charging a card in python via the nonce received from Accept.JS

I see within apicontractsv1.paymentType(), opagueData, which based on the xml example posted here: im guessing is where the magic happens. I'm just not sure how to set it.

Does it take a dictionary with 'dataDescriptor' and 'dataValue' where dataValue = nonce?

 

Any help or example would be greatly appreciated. Realistically the same script found here, just sub credit card info for nonce.

Thanks in advance!
Andrew

ar090
Member
1 ACCEPTED SOLUTION

Accepted Solutions
RichardH
Administrator Administrator
Administrator
4 REPLIES 4
RichardH
Administrator Administrator
Administrator

Thanks for the quick reply @RichardH!

Sorry for missing that, I'll give it a shot and let you know how it goes.

 

Much appreciated,

Andrew

Hey @RichardH,

 

Thank you again for the help! Was able to put together a working script utilizing the example you linked. I did find one error however with the sample incase you are interested. May help the next guy:

Line 44 here is producing an attribute error:
print ('AUTH Code : %s' % response.authCode)

I believe it should be response.transactionResponse.authCode which works for me:
print ('AUTH Code : %s' % response.transactionResponse.authCode)

Best,

Andrew

Hi @ar090,

 

I cleaned up the Python sample a little bit and made the correction you suggested. Just FYI.