Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7975901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:46:20+00:00 2026-06-04T08:46:20+00:00

I am trying to test Python and Paypal integration. Here is my call to

  • 0

I am trying to test Python and Paypal integration.

Here is my call to the PayPal module I got here: http://www.chickenwingsw.com/paypal-on-python

def testPayPal():
   import paypal
   PAYPAL_TEST_USERNAME = 'noeldo_1337351894_biz_api1.testacc.com'
   PAYPAL_TEST_PASSWORD = '1337353453'
   PAYPAL_TEST_SIGNATURE = 'AZ89-T17NMRVoILpOrfuXDv1jXZAlfJ0g5ZB76Rp5DNC010UYwxC2KS'
   PAYPAL_TEST_SIG_URL = 'https://api-3t.sandbox.paypal.com/nvp'
   paypal.SKIP_AMT_VALIDATION = True
   pp = paypal.PayPal(PAYPAL_TEST_USERNAME, PAYPAL_TEST_PASSWORD, PAYPAL_TEST_SIGNATURE, PAYPAL_TEST_SIG_URL)

   rresp = pp.DoDirectPayment(paymentaction='Sale',
                             ipaddress='127.69.56.20',
                             creditcardtype='Visa',
                             acct='4188161369058553',
                             expdate=paypal.ShortDate(2017, 5),
                             cvv2='111',
                             salutation='Mr',
                             firstname='Homer',
                             middlename='J',
                             lastname='Simpson',
                             suffix='GSTEST',
                             street='742 Evergreen Terrace.',
                             city='San Jose',
                             state='CA',
                             countrycode='US',
                             zip='95131',
                             phonenum='123-456-7890',
                             shiptostreet='742 Evergreen Terrace.',
                             shiptocity='San Jose',
                             shiptostate='CA',
                             shiptozip='95131',
                             shiptocountrycode='US',
                             amt='100.00',
                             currencycode='USD')

   logging.info('testPayPal: got response %s' % resp)

I get an error when I run print(testPayPal())

PayPalException: [‘The transaction cannot be processed due to an invalid address.’]

I have setup my Paypal sandbox account using the account type Website Payments Pro.

Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:46:21+00:00Added an answer on June 4, 2026 at 8:46 am

    Well,
    Strange thing happened.

    Was trying this on Friday and didn’t work but came back to it on Monday and ta’da, it worked.

    I set my sandbox account with paypal on friday so not sure if I needed to wait or if there was an issue with the sandbox environment.

    Anyway, this code should work if anyone is looking for an example.

    Cheers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to test some of these code here http://ha.ckers.org/xss.html on my code.
I'm trying to test my function def in a python shell, but when i
I'm trying to test some python code that uses urllib2 and lxml. I've seen
I'm trying to test this 'hello world' of python (with tornado) on ubuntu: import
I am trying to do a simple test in Python using ' unittest ',
I'm trying to do a simple primality test in Python. Accoding to Wikipedia, a
I am trying to execute/call a python script that resides in another directory. My
I'm trying to learn the Python library itertools and I thought a good test
I'm trying to unit test some code that looks like this: def main(): parser
I'm trying to create an environment using virtualenv. virtualenv test New python executable in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.