Skip to content

Commit

Permalink
removed py4j usaepay systems. Long Live SOAP
Browse files Browse the repository at this point in the history
  • Loading branch information
jsayles committed May 3, 2016
1 parent b58d5ed commit 5fe38d8
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 553 deletions.
5 changes: 0 additions & 5 deletions demo/local_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@

GOOGLE_ANALYTICS_ID = 'YOUR-GOOGLE-CODE'

USA_EPAY_URL = 'www.usaepay.com'
USA_EPAY_KEY = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
USA_EPAY_KEY2 = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
USA_EPAY_PIN2 = '1234'

MAILCHIMP_API_KEY = "goMonkeygo"
MAILCHIMP_NEWSLETTER_KEY = "melikekey"
MAILCHIMP_WEBHOOK_KEY = "hookedonhooks"
Expand Down
45 changes: 0 additions & 45 deletions launch_py4j.py

This file was deleted.

8 changes: 3 additions & 5 deletions members/templates/members/billing_profile.frag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div style="margin-left: 2em; margin-bottom: .5em;">
Current Profile:
Current Profile:
{% if member.has_valid_billing %}
<font color=green>Valid</font>
{% if member.is_guest %}
Expand All @@ -10,10 +10,10 @@ Current Profile:
{% endif %}
</div>

{% if settings.USA_EPAY_KEY %}
{% if settings.USA_EPAY_WEB_KEY %}
<div style="margin-left: 2em">
<form action="https://www.usaepay.com/interface/epayform/">
<input type="hidden" name="UMkey" value="{{ settings.USA_EPAY_KEY }}">
<input type="hidden" name="UMkey" value="{{ settings.USA_EPAY_WEB_KEY }}">
<input type="hidden" name="UMdescription" value="Office Nomads Billing Authorization">
<input type="hidden" name="UMcustid" value="{{ member.user.username }}">
<input type="hidden" name="UMcommand" value="AuthOnly">
Expand Down Expand Up @@ -41,9 +41,7 @@ Current Profile:
<input type="hidden" name="UMemail" value="{{ member.email }}">
<!--<input type="hidden" name="UMtestmode" value="true">-->
<input type="hidden" name="username" value="{{member.user.username}}">
<input type="hidden" name="auth" value="{{member.usaepay_auth}}">
<input type="submit" value="Create New Billing Profile">
</form>
</div>
{% endif %}

11 changes: 7 additions & 4 deletions nadine/local_settings.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ SECRET_KEY = 'ZZZ'

GOOGLE_ANALYTICS_ID = 'YOUR-GOOGLE-CODE'

USA_EPAY_URL = 'www.usaepay.com'
USA_EPAY_KEY = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
USA_EPAY_KEY2 = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
USA_EPAY_PIN2 = '1234'
# USAePay Settings
# Use API v1.4 Doc/Literal WSDL
USA_EPAY_URL = "https://www.usaepay.com/soap/gate/YOUR_URL_CODE/usaepay.wsdl"
USA_EPAY_KEY = "YOUR_USAEPAY_KEY"
USA_EPAY_PIN = "YOUR_USAEPAY_PIN"
# Used for adding billing profiles
USA_EPAY_WEB_KEY = "YOUR_USAEPAY_KEY"

MAILCHIMP_API_KEY = "goMonkeygo"
MAILCHIMP_NEWSLETTER_KEY = "melikekey"
Expand Down
12 changes: 7 additions & 5 deletions nadine/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,13 @@
JSIGNATURE_RESET_BUTTON = False

# USAePay Settings
USA_EPAY_URL = 'www.usaepay.com'
USA_EPAY_KEY = 'ABCDEFG'
USA_EPAY_KEY2 = 'ABCDEFG'
USA_EPAY_PIN2 = '1234'
USA_EPAY_URL_KEY = 'ABCDEFG'
# Use API v1.4 Doc/Literal WSDL
USA_EPAY_URL = "https://www.usaepay.com/soap/gate/YOUR_URL_CODE/usaepay.wsdl"
USA_EPAY_KEY = "YOUR_USAEPAY_KEY"
USA_EPAY_PIN = "YOUR_USAEPAY_PIN"
# Used for adding billing profiles
USA_EPAY_WEB_KEY = "YOUR_USAEPAY_KEY"


CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler"
CELERY_TASK_SERIALIZER = 'json'
Expand Down
11 changes: 7 additions & 4 deletions nadine/utils/payment_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
class PaymentAPI(object):

def __init__(self):
url = settings.USA_EPAY_URL2
key = settings.USA_EPAY_KEY2
pin = settings.USA_EPAY_PIN2
url = settings.USA_EPAY_URL
key = settings.USA_EPAY_KEY
pin = settings.USA_EPAY_PIN
self.entry_point = USAEPAY_SOAP_API(url, key, pin)

def get_customers(self, username):
return self.entry_point.getAllCustomers(username)
customers = self.entry_point.getAllCustomers(username)
if not customers:
return []
return customers

def get_transactions(self, year, month, day):
raw_transactions = self.entry_point.getTransactions(year, month, day)
Expand Down
6 changes: 3 additions & 3 deletions nadine/utils/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class UsaepayTestCase(SimpleTestCase):

def get_client(self):
if not self._client:
url = settings.USA_EPAY_URL2
url = settings.USA_EPAY_URL
self._client = Client(url)
return self._client

Expand All @@ -35,8 +35,8 @@ def get_token(self, key, pin):
return self._token

def test_soap(self):
key = settings.USA_EPAY_KEY2
pin = settings.USA_EPAY_PIN2
key = settings.USA_EPAY_KEY
pin = settings.USA_EPAY_PIN

client = self.get_client()
token = self.get_token(key, pin)
Expand Down
179 changes: 0 additions & 179 deletions nadine/utils/usaepay_api.py

This file was deleted.

Binary file removed py4j_gateway/USAePayAPI-jaxws-1.2.jar
Binary file not shown.
Loading

0 comments on commit 5fe38d8

Please sign in to comment.