Raymond Yee
a7f6d8e7cc
put more of the skeleton for Account pre_save handler
2013-03-01 17:54:37 -08:00
Raymond Yee
76a88e2db2
placed a pre_save handler to provide a part of framework for Account.status change
2013-02-27 11:31:02 -08:00
Raymond Yee
cbfabbfa3c
Implemented Account.status migration
2013-02-27 10:08:36 -08:00
Raymond Yee
c3f922e9ba
First pass at regluit.payment.models.Account.status
2013-01-14 16:18:19 -08:00
Raymond Yee
9493897a42
[ #41908015 ] 'incorrect_number' and 'processing_error' error should also result in pledge_failed notice ->
...
catch incorrect_number (and processing_error for now) for sending the pledge_failed notice
2013-01-03 14:10:05 -05:00
Andromeda Yelton
be6a1082c2
whoa, urlencode takes dicts and this was failing silently all along
2012-12-11 13:07:09 -05:00
Raymond Yee
0db13cd84a
[finish #40315289 ] I move the notice on transaction charged or failed from webhooks handler into stripelib.Processor.Execute
2012-11-29 16:24:51 -08:00
Raymond Yee
ecea475419
a few modifications to pledge_failed notice
2012-11-21 11:40:19 -08:00
Raymond Yee
cbac6f1e3c
First round of edits to get pledge_charged and pledge_failed notices to be parallel. tests passing
2012-11-21 09:21:01 -08:00
Raymond Yee
ce6e7f865d
tests pass on this commit
2012-11-20 13:56:14 -08:00
Raymond Yee
c034e10b30
Putting in some code to record a PaymentResponse to track errors in stripelib.Execute
2012-11-20 09:28:10 -08:00
Raymond Yee
f4deee8be4
Merge branch 'empty_stripe_token' into charge_failed
2012-11-14 11:43:29 -08:00
Raymond Yee
7fe502ecdf
check for zero length stripe token
2012-11-14 11:42:52 -08:00
Raymond Yee
a62c82df9b
Merge branch 'empty_stripe_token' into charge_failed
2012-11-14 10:58:01 -08:00
Raymond Yee
346d4d8980
First step in patching the problem of null stripe_token
2012-11-14 10:53:19 -08:00
Raymond Yee
f2bb53f132
recharge signal being fired now
2012-11-12 12:48:03 -08:00
Raymond Yee
a90f133166
First pass at writing a signal handler to recharge transaction if account updated
2012-11-12 11:22:20 -08:00
Raymond Yee
793d984ba3
Implemented basic transaction_failed signal and notices -- THEY STILL NEED WORK
...
Tests handle situation of transaction_failed too
2012-11-06 11:22:25 -08:00
Raymond Yee
7ea5ac7ca6
1) Now fire the transaction_charged signal in the Stripe webhook handling
...
2) add WebTest to requirements
3) have a check on possible Stripe events
2012-11-05 10:44:24 -08:00
Raymond Yee
f6bf774f2c
Test sending junk to webhook handler
...
Simulate sending events to the ipnhandler and check to see how many emails generated in test
2012-11-02 14:46:49 -07:00
Raymond Yee
9826951d36
Continuing to build out UnifiedCampaignTests -- now includes scenario where a pledge is made and charged -- and the corresponding Stripe events are polled and inspected
2012-11-01 14:06:11 -07:00
Raymond Yee
96b62aa163
basic skeleton for test based on loading fixture
...
keep the signals for create userprofile, wishlist, and credit from firing if fixtures being loaded
2012-10-31 11:08:46 -07:00
Raymond Yee
a973015f04
Merge branch 'webhooks' of github.com:Gluejar/regluit into webhooks
...
Conflicts:
payment/stripelib.py
2012-10-31 08:27:39 -07:00
Raymond Yee
30fd1332af
Expanding functionality of stripelib.Processor.Execute -- better error handling
2012-10-31 08:23:13 -07:00
Raymond Yee
5df6dea26b
Comment section stripelib.Processor.Execute that needs to be modified in light of how we now let users update the CC on file
2012-10-30 20:01:41 +00:00
Raymond Yee
32b20556c2
Skeleton for handling charge related webhooks
2012-10-30 11:17:09 -07:00
Raymond Yee
b4b5437ff5
Now working -- can send email to RY for customer.created
2012-10-23 22:18:03 +00:00
Raymond Yee
29438050d1
test of sending email to RY upon customer.created event
2012-10-23 14:20:13 -07:00
Raymond Yee
8b2e1054e9
Start to break down the various type of events we'll need to handle
2012-10-23 09:29:47 -07:00
Raymond Yee
86aae9f18b
Now ask Stripe for event info in ipn
2012-10-22 08:25:47 -07:00
Raymond Yee
5f75a17310
First pass at parsing json + log webhook
2012-10-22 07:50:52 -07:00
Raymond Yee
6af74af6e0
Added "from django.http import HttpResponse"
2012-10-22 06:55:30 -07:00
Raymond Yee
b231011515
handle in a generic fashion all Stripe listable objects
2012-10-19 18:11:46 -07:00
Raymond Yee
8a85aa88d3
first cut at producing iterator interfaces to Stripe objects -- here I implement one for events
...
don't yield empty page in bookdata.py's grouper
remove extraneous import in gutenberg.py
expose stripe test key as a module variable to make it easier to create a StripeClient that will be in test mode (sc=StipeClient(api_key=TEST_STRIPE_SK))
2012-10-18 06:59:08 -07:00
Raymond Yee
df17c3c865
Merge branch 'master' into webhooks
2012-10-17 09:08:27 -07:00
eric
48be5a1191
xhtml nits
2012-10-15 10:28:31 -04:00
Raymond Yee
cf433386e8
starting to make it easier to put stripelib in test mode
2012-10-15 06:24:12 -07:00
Raymond Yee
51e17e6886
Merge branch 'master' of github.com:Gluejar/regluit
2012-10-14 21:52:43 -07:00
Raymond Yee
c16df417e6
Hello world of IPN
2012-10-14 21:16:15 -07:00
eric
bda3211a76
user can manage their account credit card [ #37674369 ]
2012-10-14 23:41:17 -04:00
eric
1c557e1488
fix reference to Donation Credit canceler
2012-10-14 22:08:34 -04:00
Raymond Yee
d8a30a733a
Add a log message for loading of keys in stripelib
2012-10-13 16:42:24 -07:00
Raymond Yee
f152bc97b1
Merge branch 'reuse_account'
...
Conflicts:
frontend/views.py
2012-10-13 16:19:45 -07:00
eric
5bde0da8ca
[ #37716025 ] reuse a user's credit card
2012-10-13 13:45:46 -04:00
eric
dbacb5a96d
max_amount, not amount before the authorization
2012-10-13 13:38:39 -04:00
Raymond Yee
b904cb1f28
Fixed a bug in the logging statement that had mismatched # of parameters
2012-10-13 08:23:07 -07:00
eric
2ae6942f4f
better to not have logging of tokens
2012-10-13 00:48:46 -04:00
eric
476ce46dab
display and notifications of acknowledgements
2012-10-12 23:45:09 -04:00
eric
6a1646f749
fixed bad method signature
2012-10-12 22:25:48 -04:00
eric
be3f989d36
although "up_or_down" not distinguished, should make it return what it says it is
2012-10-12 18:18:55 -04:00
eric
7d21e60984
if view expects one acct peruser, dont give it multiple accounts! [ #36797599 ]
2012-10-12 16:03:50 -04:00
Raymond Yee
b0858ea12e
add a payment.manager.PaymentManager.retrieve_or_make_accounts
...
Made a change in make_account signature to allow for token=None
2012-10-12 07:44:50 -07:00
Raymond Yee
b281aca869
[ #37567927 ] enforce constraint of at most 1 active Account / user of given host
...
-> migration was missing before from an earlier commit -- add in now.
2012-10-11 16:36:24 -07:00
Raymond Yee
9d17f93fac
Now I have some tests to show how to trigger all of the stripe CardError except invalid_number, expired_card, and processing_error -- ones that we'll need to simulate in some other way
2012-10-08 13:08:28 -07:00
Raymond Yee
447b5973c2
Add ProcessorError
...
Start elaborating StripeClient testing
2012-10-06 09:51:43 -07:00
Raymond Yee
5df3ab23ab
Merge branch 'master' into relaunch_ry
2012-10-04 09:35:54 -07:00
eric
75e0a4c534
clean up two loose ends
2012-10-03 17:36:17 -04:00
eric
462011ed7e
add_pledge_badge was just a bug waiting to happen
2012-10-03 17:06:51 -04:00
Raymond Yee
f9e81d1741
syntax error fix
2012-10-03 09:24:04 -07:00
eric
57dc500643
Revert "Revert "wired badge awarding into pledge modified and pledge complete signals""
...
This reverts commit 863055c305
.
2012-10-03 08:57:24 -04:00
eric
863055c305
Revert "wired badge awarding into pledge modified and pledge complete signals"
...
This reverts commit 759e39f61d
.
2012-10-03 08:56:29 -04:00
eric
65998ac219
this belongs with last commit
2012-10-02 23:51:25 -04:00
eric
73910ae8a0
To get credit module working again, had to move some methods into an object that inherits from a base class
...
So now all payment processor specific methods are on a Processor
object,
2012-10-02 23:49:19 -04:00
eric
7a1cf969ca
fixed circular import problems [finish #37053797 ]
2012-10-02 22:14:40 -04:00
Raymond Yee
e6b5146dff
the Stripe api keys for nonprofit partner should be gone
2012-10-02 12:06:38 -07:00
Raymond Yee
89b3b5c599
[ #37053797 ] reverting stripelib.py -- Sn tests run but django command test_stripe_charge fails: done so Eric can fix circular import issue:
...
>>> >>> >>> (regluitdj14)raymond-yees-computer:regluit raymondyee$ django-admin.py test_stripe_charge
Traceback (most recent call last):
File "/Users/raymondyee/.virtualenvs/regluitdj14/bin/django-admin.py", line 5, in <module>
management.execute_from_command_line()
File "/Users/raymondyee/.virtualenvs/regluitdj14/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
File "/Users/raymondyee/.virtualenvs/regluitdj14/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/raymondyee/.virtualenvs/regluitdj14/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/Users/raymondyee/.virtualenvs/regluitdj14/lib/python2.7/site-packages/django/core/management/__init__.py", line 69, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/Users/raymondyee/.virtualenvs/regluitdj14/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/Users/raymondyee/C/src/Gluejar/regluit/payment/management/commands/test_stripe_charge.py", line 2, in <module>
from regluit.payment import stripelib
File "/Users/raymondyee/C/src/Gluejar/regluit/payment/stripelib.py", line 10, in <module>
from regluit.payment.models import Account
File "/Users/raymondyee/C/src/Gluejar/regluit/payment/models.py", line 4, in <module>
from regluit.core.models import Campaign, Wishlist, Premium, PledgeExtra
File "/Users/raymondyee/C/src/Gluejar/regluit/core/models.py", line 998, in <module>
from regluit.payment.manager import PaymentManager
File "/Users/raymondyee/C/src/Gluejar/regluit/payment/manager.py", line 2, in <module>
from regluit.payment.models import Transaction, Receiver, PaymentResponse
ImportError: cannot import name Transaction
2012-10-02 12:02:45 -07:00
Raymond Yee
72a440383d
a django command to do a test charge
2012-10-02 11:49:17 -07:00
Raymond Yee
9b42c0ccd9
Merge branch 'master' into relaunch_ry
...
Conflicts:
requirements_versioned.pip
2012-10-02 10:18:24 -07:00
Raymond Yee
27d0a808e0
get rid of more paypal references
2012-10-02 10:16:34 -07:00
Raymond Yee
166afece62
made some changes to reduce the likelihood of circular import dependencies in stripe code.
...
Made sure there is a core_key table in campaidgn_starter sql
2012-10-01 16:38:51 -07:00
eric
759e39f61d
wired badge awarding into pledge modified and pledge complete signals
2012-10-01 18:28:26 -04:00
Raymond Yee
9e048c44f5
Get rid of print statement
2012-09-28 10:12:25 -07:00
Raymond Yee
3b04ddb4a9
Merge branch 'relaunch' into relaunch_ry
2012-09-27 14:07:47 -07:00
eric
880a9f14bd
now adding credit records in migration [start #36325665 ]
...
that wasn't so hard
2012-09-27 12:58:47 -04:00
Raymond Yee
4a10edce1d
[ #36469239 ] Now handles modifications where new amount > previous amount and cancellation of pledge
2012-09-27 09:32:29 -07:00
Raymond Yee
8bd7a5eb65
[deliver #36743191 ] move stripe implementation UI back to stripe.js
2012-09-26 15:03:46 -07:00
Raymond Yee
1ab2383fec
Reverting to using stripe.js on stripe/test as a stepping stone to changing fund_the_pledge.html
2012-09-26 13:52:36 -07:00
eric
b75bb0c3a6
now adding credit records in migration [start #36325665 ]
...
that wasn't so hard
2012-09-26 13:52:21 -04:00
Raymond Yee
5833f8c0d3
Successfully able to modify transaction from $10 -> $5 in selenium script
2012-09-25 18:30:36 -07:00
Raymond Yee
1cbe62d573
Redirecting to pledge_complete works now -- though there's definitely clean up to do
2012-09-25 11:52:56 -07:00
Raymond Yee
d0be2f8761
[ #36469239 ] I can now get a transaction to work via stripelib.py now
2012-09-24 16:29:20 -07:00
Raymond Yee
ed6bb5f3e0
BROKEN CODE -- checked in while I switch to working on other branch
2012-09-24 11:30:21 -07:00
Raymond Yee
e8494864d4
This code is BROKEN -- but I'm committing this to capture current state of work -- problem is
...
global name 'stripe_token' is not defined
Exception Location: /Users/raymondyee/C/src/Gluejar/regluit/payment/stripelib.py in __init__, line 285
when you run the selenium test -- brings up issue of where to create Stripe account in PaymentManager abstraction
2012-09-21 17:40:33 -07:00
Raymond Yee
df4e434c45
Fold stripe2.py into stripelib.py
2012-09-21 11:24:42 -07:00
Raymond Yee
980bb218a0
stripe2.Execute actually charges the transaction -- NEED to do some more error checking
2012-09-18 17:56:38 -07:00
Raymond Yee
be45a27b45
moving transaction.host None -> PAYMENT_HOST_NONE
...
a few typos (t->transaction, missing host)
skeleton for stripe2.py -- the module to implement various methods used by payment.manager
2012-09-18 17:01:07 -07:00
Raymond Yee
ebb2144055
Responding to Eric's comment: yes Account.date_created should have auto_now_add not auto_add
...
I modified migration and model.
2012-09-18 08:16:12 -07:00
Raymond Yee
6a650affc8
Now recording pledge as such -- and not charging immediately.
...
running into exception at https://github.com/Gluejar/regluit/blob/relaunch_ry/payment/manager.py#L554-- have to start implementing a baseclass for stripelib to handle pledge modification
2012-09-17 16:56:07 -07:00
Raymond Yee
69e959a0c8
fleshing out of payment.models.Account
2012-09-17 14:55:28 -07:00
Raymond Yee
f08206c5d0
got rid of repeated line (thanks, Eric -- fd1887ea44 (commitcomment-1865176)
)
2012-09-17 10:54:39 -07:00
Raymond Yee
fd1887ea44
[ #36028929 ] Work to pull out relevant fields in stripe Customer and Charge model with goal of figuring out which to add to payment.models.{Account | Transaction}
2012-09-14 17:00:21 -07:00
Raymond Yee
c545173793
First pass at payment.models.Account
2012-09-13 16:43:54 -07:00
Raymond Yee
2ab1f8c7ea
Now creating a charge based on token
2012-09-11 15:17:37 -07:00
Raymond Yee
bcceaa719b
integrating stripe into fund_the_pledge
2012-09-10 13:17:30 -07:00
Raymond Yee
3417c6372c
Allow for passing in card instead of customer for creating stripe charge
2012-09-10 07:23:03 -07:00
Raymond Yee
b8c0c8f98e
Remove remnants of balanced and wepay that I missed earlier
2012-09-07 13:47:15 -07:00
Raymond Yee
f639aa02dd
Merge branch 'newpayment' into relaunch
...
Conflicts:
frontend/views.py
payment/manager.py
2012-09-07 13:46:09 -07:00
eric
6762c7d3f2
not really supposed to use Decimal.NaN changed to Decimal('NaN')
2012-09-07 14:40:00 -04:00
Raymond Yee
101cf1e7a0
Removed references to wepay and balanced
2012-09-07 11:31:49 -07:00
eric
0c9d71e4d6
introduce PledgeExtra data object to simplify method calls
2012-09-07 09:46:38 -04:00
eric
790969745e
authorize method has changed
2012-09-07 09:45:43 -04:00
eric
4d4e61d338
donation modification now works [ #21784207 ]
2012-09-06 16:55:32 -04:00
eric
d63063b740
add missing notification for donation pledges
2012-09-06 13:27:34 -04:00
eric
d14548f3af
not sure how I missed this bug
2012-09-06 11:36:52 -04:00
eric
8eeadc99d3
woo hoo, credit and donation scaffolding works end to end [ #21784207 ]
2012-09-06 01:01:17 -04:00
Raymond Yee
bcbc75ed3d
More analysis of what we need to figure out still about stripe.
2012-09-05 16:11:32 -07:00
Raymond Yee
e8e6a51068
added a bit of handling of stripe Transfers
2012-08-31 22:59:22 -07:00
Raymond Yee
cc8c075842
show error from bad card with stripe call
2012-08-31 11:19:05 -07:00
eric
c20e6299bb
off to a great start this morning [ #16582483 ]
2012-08-31 11:05:00 -04:00
eric
7afedcd0b6
ack_link now considers anonymous [ #16582483 ]
2012-08-31 10:58:57 -04:00
eric
94270f33c6
add in credi processing; overhaul the PledgeView forms and partition authorize fn in Manager
...
also removed unused target, lists, ack-link,
2012-08-31 03:16:04 -04:00
eric
f299d9ecf7
rip out paypal and amazon code
2012-08-31 03:12:15 -04:00
eric
618eda4aa5
eliminate db skew between prod and relaunch
2012-08-31 02:49:04 -04:00
Raymond Yee
5ac4976950
Basic test for creating Customer, a charge, and then deleting Customer
2012-08-30 16:51:59 -07:00
Raymond Yee
e44052712c
Now able to wrap stripe functionality in a StripeClient object that is tied to a specific api_key. We use separate api_key for Gluejar and for partner non-profit
2012-08-30 09:24:42 -07:00
Raymond Yee
55d170e798
trivial change to try to trigger the display of the latest commit in github for newpayment
2012-08-29 08:22:35 -07:00
Raymond Yee
bd48fdb437
Adding stripe payment tag use
2012-08-29 07:34:20 -07:00
Raymond Yee
ec9c6d8fc0
add keys for partner non-profit in stripelib
2012-08-27 07:49:43 -07:00
Raymond Yee
214bc4b9e5
A pass to get a charge iframe show up for wepay
2012-08-20 15:19:27 -07:00
Raymond Yee
6c4f98095f
First pass at balancedpayment prototype
2012-08-17 22:57:56 -07:00
Raymond Yee
e81a25b1bd
Now documenting more of what we need to do next with stripe if we go for a fullblown implementation
2012-08-16 17:24:18 -07:00
Raymond Yee
0d88a395cb
First pass at stripe prototype --> /stripe/test will now let you type in a test credit card and display resulting stripeToken
2012-08-16 14:11:32 -07:00
eric
10560fb36b
merge credit into relaunch
2012-08-14 21:15:31 -04:00
eric
5362c202bb
added management command to create credits, balance notification [ #21784207 ]
2012-08-07 14:12:50 -04:00
eric
daf0636c5f
back end for credit system [ #21784207 ]
2012-08-06 22:52:45 -04:00
Andromeda Yelton
da0f4970c2
improving data flow of acks throughout system
2012-08-06 15:44:43 -04:00
Andromeda Yelton
b2161d8936
having acks variables works better if you actually pass them through all stages of the data flow
2012-08-06 13:34:51 -04:00
Andromeda Yelton
b041430731
front end for new pledge page, plus just enough back end that it displays
2012-08-01 08:52:39 -04:00
Andromeda Yelton
5855593c5b
adding support for acknowledgement fields throughout data pipeline
2012-07-23 08:31:57 -04:00
Andromeda Yelton
ef005bbef1
added fields for supporter acknowledgement to class Transaction
2012-07-23 08:12:40 -04:00
Raymond Yee
1097c7891b
verify signature for amazon payment return
2012-07-11 21:27:24 -07:00
eric
1764cd62d6
small optimization of supporter count
2012-07-07 16:38:23 -04:00
Raymond Yee
275d127e29
If we're canceling a campaign, record the reason in the transaction.reason as "UNSUCCESSFUL CAMPAIGN" (by default)
2012-06-29 11:11:42 -07:00
eric
dfe17f94fa
[finish #31637107 ] refactored transaction summary code, now considers pending and other transactions
2012-06-21 23:20:58 -04:00
eric
eec03bd568
unused code
2012-06-21 23:20:58 -04:00
Raymond Yee
25268b34bc
[ #29500707 ] Logging an error when an attempt to cancel a transaction does not succeed
2012-06-15 16:59:51 -04:00
Raymond Yee
60434b24ad
removing one redundant notice in pledge modify
2012-06-15 13:48:05 -04:00
Raymond Yee
2b7da6e91e
First attempt to place the notices properly coming from a pledge modify -- inside payment.manager.cancel_related_transaction -- but current problem is now that we get too many notices
2012-06-15 11:38:38 -04:00
Raymond Yee
9058327370
Modify checkStatus to handle the scenario in which we pass in transactions to check on
2012-06-13 08:35:18 -04:00
Jason
56b6ed57cb
Adding better error/exception handling to the amazon payment return URL
2012-06-12 14:52:53 -04:00
Raymond Yee
54e0ce8644
Slight change in amazon.py to avoid circular imports
2012-06-08 15:40:13 -04:00
Raymond Yee
3d07e09424
Merge branch 'master' into fps
...
Conflicts:
payment/manager.py
2012-06-08 15:02:57 -04:00
Jason
ef1338f7ce
Removing extra cancel operations as part of payment checkStatus
2012-06-01 13:42:48 -04:00
Jason
3b7e57ad2a
Fixing bug in payment checkStatus code to test for multiple active transactions per campaign
2012-06-01 13:16:52 -04:00
Jason
886280fe21
Adding modifications to payment/pledge modification code. The modify funciton will not cancel the existing pre-approval unless it is fully approved by the user via the co-branded API
2012-06-01 13:13:37 -04:00
Andromeda Yelton
79bdcf3f5c
commenting
2012-05-29 21:16:01 -04:00
Andromeda Yelton
1c5264d8a1
removing reference to payment_processor context variable, made irrelevant now that we have transaction.host
2012-05-29 21:01:17 -04:00
Andromeda Yelton
48481bd819
improving ple pledge_modified
2012-05-29 20:50:53 -04:00
Raymond Yee
40d0397bc8
Document the new modification argument for payment.manager.PaymentManager.authorize
2012-05-29 15:16:21 -07:00
Raymond Yee
88d6955685
Name error --> transaction should be t
2012-05-29 11:41:36 -07:00