Permalink
Browse files

removed django-paypal from submodules and added as requirements, chan…

…ges in folder structure
  • Loading branch information...
1 parent edca48d commit f93a10e5464613c62a57492909afb94864f6cfac @ashok-raavi ashok-raavi committed Sep 29, 2010
View
@@ -1,3 +1 @@
-[submodule "django-paypal"]
- path = django-paypal
- url = http://github.com/dcramer/django-paypal.git
+
File renamed without changes.
File renamed without changes.
No changes.
@@ -2,6 +2,8 @@
import urllib
import urllib2
+from django.conf import settings
+
API_VERSION = '3.1'
DELIM_CHAR = ','
ENCAP_CHAR = '$'
@@ -10,10 +12,10 @@
class AuthorizeNetGateway:
- def __init__(self, login, password, test_mode=True):
- self.login = login
- self.password = password
- self.test_mode = test_mode
+ def __init__(self):
+ self.login = settings.AUTHORIZE_LOGIN_ID
+ self.password = settings.AUTHORIZE_TRANSACTION_KEY
+ self.test_mode = getattr(settings, 'MERCHANT_TEST_MODE', False)
self.test_url = "https://test.authorize.net/gateway/transact.dll"
self.live_url = "https://secure.authorize.net/gateway/transact.dll"
File renamed without changes.
Submodule django-paypal deleted from 5d67bb
View
@@ -3,7 +3,7 @@
from django import forms
-from merchant.credit_card import CreditCard
+from billing.credit_card import CreditCard
class CreditCardForm(forms.Form):
CARD_TYPES = [
View
@@ -3,4 +3,7 @@
urlpatterns = patterns('app.views',
url(r'^$', 'index', name='app_index'),
+ url(r'^authorize/$', 'authorize', name='app_authorize'),
+ url(r'^paypal/$', 'paypal', name='app_paypal'),
+ url(r'^eway/$', 'eway', name='app_eway'),
)
View
@@ -1,25 +1,26 @@
from django.shortcuts import render_to_response
from django.template import RequestContext
+from django.http import HttpResponse
from app.forms import CreditCardForm
-from merchant.gateways.authorize_net import AuthorizeNetGateway
-from merchant.gateways.paypal_card import PaypalCardProcess
-from merchant.credit_card import CreditCard
+from billing.gateways.authorize_net import AuthorizeNetGateway
+from billing.gateways.paypal_card import PaypalCardProcess
+from billing.credit_card import CreditCard
def render(request, template, template_vars={}):
return render_to_response(template, template_vars, RequestContext(request))
-def index(request):
+def index(request, gateway=None):
amount = 1
response = None
if request.method == 'POST':
form = CreditCardForm(request.POST)
if form.is_valid():
data = form.cleaned_data
credit_card = CreditCard(**data)
- # merchant = AuthorizeNetGateway(login='92KgL2uD', password='4nT73z4473vLJfXF')
+ # merchant = AuthorizeNetGateway()
# response = merchant.purchase(amount, credit_card)
merchant = PaypalCardProcess()
response = merchant.purchase(amount, credit_card, options={'request': request})
@@ -28,3 +29,15 @@ def index(request):
return render(request, 'app/index.html', {'form': form,
'amount': amount,
'response': response})
+
+
+def authorize(request):
+ return HttpResponse('Authorize')
+
+
+def paypal(request):
+ return HttpResponse('Paypal')
+
+
+def eway(request):
+ return HttpResponse('Eway')
View
@@ -1,6 +1,11 @@
DEBUG = True
+# AUTHORIZE.NET SETTINGS
+AUTHORIZE_LOGIN_ID = ''
+AUTHORIZE_TRANSACTION_KEY = ''
+
+# PAYPAL SETTINGS
PAYPAL_TEST = True
PAYPAL_WPP_USER = ''
PAYPAL_WPP_PASSWORD = ''
View
@@ -93,6 +93,7 @@
# 'django.contrib.admin',
'app',
+ 'billing',
'paypal.standard',
'paypal.pro',
)
View
1 paypal
View
@@ -0,0 +1 @@
+-e git+http://github.com/dcramer/django-paypal.git@5d67bb677a47c4051db0a9d65866f90a3a7ccd28
@shabda

shabda Sep 29, 2010

Owner

Why dcramer one instead of this?

github.com/johnboxall/django-paypal

@ashok-raavi

ashok-raavi Sep 29, 2010

Contributor

just because dcrammer's branch is being actively developed

0 comments on commit f93a10e

Please sign in to comment.