Commit Graph

418 Commits (beb76ea4bba099b480987c4986dbe5f2fc761bc2)

Author SHA1 Message Date
eric 09fe1a5d32 switch from deprecated get_model a app registry 2016-07-24 18:39:36 -04:00
eric 9e3fef8e9e fix models so django migrate can build an empty db 2016-07-22 18:49:19 -04:00
eric dbcf4dba6b remove payment.templatetags
duplicate app name not allowed in 1.7
2016-07-21 15:57:42 -04:00
eric d8eb4297d9 migrations 2016-07-21 15:38:09 -04:00
Raymond Yee dfcde1f46b skipping certain tests explicitly, ones that I had been able to skip in Django 1.4 with suites() but, for some reason, are being run in Django 1.6. 2016-04-19 07:49:20 -07:00
Raymond Yee 877b296128 commenting out payment.tests.BasicGuiTest because for some reason
the suite() is not being honored and BasicGuiTest is being run when
I run  django-admin.py test payment

have to explore further: http://stackoverflow.com/questions/21572921/django-celery-test-runner-doing-very-strange-things
2016-04-12 10:48:04 -07:00
eric 7e3e1655e1 one more null boolean 2016-04-09 13:26:42 -04:00
eric bca17837a0 add fixtures in testcases 2016-04-09 13:21:12 -04:00
eric a4e9855b35 revert to older, patched Notification 2016-04-08 18:45:50 -04:00
eric 14829c327a misc fixes for 1.6 2016-04-08 18:12:10 -04:00
eric 356207bc5d patch django.conf.urls.defaults 2016-04-07 20:38:53 -04:00
eric 562be5f12d patch django-notification 2016-04-07 20:37:54 -04:00
eric f1b29bcf46 There are no references to settings.BASE_URL 2015-08-25 11:07:11 -04:00
Raymond Yee b10f8296ba needed to have unicode to handle non-ascii names in Stripe 2015-04-21 08:55:27 -07:00
eric 927d644ffc noticed potential problem in payment when username is unicode 2015-01-14 18:05:03 -05:00
eric af3ea58b7b examined order_by queries, added indices as required 2014-07-31 12:17:42 -04:00
eric 3f4231e091 add script that starts to generate "cost of sold items" records
Committing mainly to get it in repo; I am running this from python
notebook; no testing needed
2014-06-16 18:15:50 -04:00
eric 14759ac546 always show learn more to anonymous users
logged in users get still get the drop-down
2014-03-30 21:28:32 -04:00
eric f7fea1874e wish list was not getting set because of vestigial transaction type check
[fix #67399604]
2014-03-14 13:04:11 -04:00
Raymond Yee 256c60fbfc Merge branch 'master' into t4u_download
Conflicts:
	core/models.py
2014-03-03 11:08:50 -08:00
eric 3986124464 fix two bugs 2014-03-01 17:13:57 -05:00
Raymond Yee 2a55277302 Campaign moved from payment to core 2014-02-28 15:32:50 -08:00
eric 678eb02847 Thanks works with anonymous user 2014-02-20 15:56:10 -05:00
eric b5fd630bfc Thanks mostly works. 2014-02-19 22:18:23 -05:00
eric b3465ea084 search code for dependence on deadline being not null 2014-01-15 17:59:45 -05:00
eric b331866c38 fix test 2013-12-15 01:26:42 -05:00
eric 82443593ea make zeros show 2013-12-15 00:46:50 -05:00
eric 40e611bac5 revive the gift/donation credit funtionality, at least for b2u campaigns
The reason for doing this is so a library can put in money with one
check, then use it up gradually. (we get to pocket the fees that would
go to stripe) One change here- in b2u there is an extra click to get to
download page, even if no gift credit is involved - this way the user
knows what and how he's bee charged
2013-12-15 00:31:06 -05:00
eric 2892a22824 change terminology from "donation" to "gift" 2013-12-13 15:15:35 -05:00
eric 6539370e37 remove commented code 2013-11-25 13:37:15 -05:00
eric dd83434282 Fix error handling in Pay 2013-11-25 13:01:16 -05:00
eric 18f104c210 latent spelling error 2013-11-24 18:44:40 -05:00
eric 1c33c34f21 purchase complete notification, contextual wishlist active, fulfillment in signal handler 2013-08-22 14:30:56 -04:00
eric 75ec13cb39 make sure the transaction isn't double charged! 2013-08-22 14:03:22 -04:00
eric 80d78e624f remove amazon cruft to get current_total correct 2013-08-19 23:23:27 -04:00
eric 91f7c5f23d Remove some payment dependence on campaign details 2013-08-19 22:52:22 -04:00
eric 8317356cc2 moved to not_maintained 2013-08-19 22:27:25 -04:00
eric d5b9f88380 move "extra data" into a json field dict to improve payment code tidieness
need to install jsonfield
note: this is https://bitbucket.org/schinckel/django-jsonfield
I tried https://github.com/bradjasper/django-jsonfield but it was not
compatible with South
2013-08-18 15:21:55 -04:00
Raymond Yee f9fad3260a instance -> self in Account.update_status() -- d'oh 2013-08-08 16:28:34 -04:00
Raymond Yee cf7160b72d Adding an optional flag to Account.update_status, which by default, send notices only if the status is *changing*.
Set send_notice_on_change_only = False to send notice based on new_status regardless of old status.  (Useful for initialization)
2013-08-08 13:31:38 -04:00
eric c30c0de604 make recharge_failed_transactions a method on account
There were four places in the code that triggered the
recharge_failed_transactions signal and only one of them mattered. I
think this layout makes the code much easier to understand.
2013-08-05 14:37:46 -04:00
eric 25d9edf4d8 fix non-working update_status method 2013-08-05 12:18:18 -04:00
eric b28412ec7a fix import on payment/tasks 2013-08-05 12:15:04 -04:00
eric 6da8d16770 moved the payment tasks to payment from core 2013-08-03 18:42:33 -04:00
Raymond Yee 3936692244 [#40140123] Add Account.update_status() to replace handle_Account_status_change thus resolving a number of issues Eric identified:
* [ ]https://github.com/Gluejar/regluit/pull/176/files#r4221450 "It also seems odd to be using signals to talk only within the same module. This seems to me to be a misuse of signals, and makes for code that is harder to read"  -- I need to decide whether I agree w/ Eric.
   * [ ]https://github.com/Gluejar/regluit/pull/176/files#r4366503 long exchange "making it readonly would be overkill (java-ish) but the current code is not clear. Your save signal handler has to figure out whether a state transition has occurred and then act accordingly, which seems like a lot of hoops to jump though. better to put all the transition work in one place. For example, shouldn't it be the deactivate method that sets the status to deactivated?

For example, the methods on campaign do a reasonable job of handling all the status transitions."  What I  should:  mimic structure of  4fc449dad5/core/models.py (L322)   -> time to write up how Campaign works

   * [ ]https://github.com/Gluejar/regluit/pull/176/files#r4214827 "could also mean the Account has been deleted. don't you really want instance.pk=None?"

   * [ ]https://github.com/Gluejar/regluit/pull/176/files#r4221509 "since, these actions are being done in batch mode, the emit notifications would work a lot better if they were emitted after the batch of notifications is created."
2013-07-23 14:16:42 -07:00
Raymond Yee 37ce78fda2 Merge branch 'master' into expiring_cc 2013-07-17 18:12:30 -07:00
Raymond Yee dabaa2f843 update tests to account for new events (now stripe allows multiple cards/customer and now generates card related events in addition to customer events) 2013-07-15 14:52:29 -07:00
Raymond Yee e4ab0ccd61 Merge branch 'instant_charge' into expiring_cc 2013-07-09 14:46:06 -07:00
Raymond Yee 46d1d4f767 Merge branch 'master' into expiring_cc
Conflicts:
	payment/models.py
	payment/tests.py
2013-07-08 10:52:44 -07:00
Raymond Yee ccbc78a10c added a first pass for payment.tests.TransactionTest.test_paymentmanager_charge to illustrate use of PaymentManager.charge() -> hardwired for stripelib right now.... 2013-06-28 16:05:19 -07:00
Raymond Yee 3ff53dd5bc first pass at stripelib.Processor.Pay 2013-06-26 18:46:30 -07:00
Raymond Yee d3166d3aef Merge branch 'master' into instant_charge 2013-06-26 17:17:07 -07:00
eshellman 5a207bf4e8 Merge pull request #181 from Gluejar/simpler_download
Simpler download. Yay.
2013-06-26 11:39:39 -07:00
Raymond Yee 701533117f fixed some seemingly bad defaults in baseprocessor
basic pass at payment.manager.PaymentManager.charge
2013-06-25 15:34:20 -07:00
Raymond Yee 867e745f75 Merge branch 'master' into instant_charge 2013-06-25 11:26:39 -07:00
Raymond Yee cae7f6d862 also delete the commented out pledge method 2013-06-25 11:23:21 -07:00
Raymond Yee 22dc844b07 Getting rid of tests that call PaymentManager.pledge 2013-06-25 11:05:52 -07:00
Raymond Yee 1725331aa0 cleaning out some old refs to Paypal 2013-06-25 10:39:49 -07:00
Raymond Yee 5e3fca0282 in stripelib.py, I am resurrecting PledgeScenarioTest
in manager.py, a very rough first pass at charge -- not working yet, but doesn't break things either
2013-06-24 16:19:12 -07:00
Raymond Yee 53178d80ce moving to stripe 1.9.1 2013-06-21 15:14:51 -07:00
Raymond Yee a36ff38745 extraneous creation of StripeClient 2013-06-20 13:39:06 -07:00
Raymond Yee c76a320912 * Comment out current payment.manager.PaymentManager.pledge -- tests run ok -- so it looks like I suspect: that we don't use that code and it's a hold-over from PayPal code
* stub for stripelib.Processor.Pay
2013-06-19 18:54:32 -07:00
Andromeda Yelton ad69580b2d PEP 8, PEP 328. I feel better now. 2013-06-03 12:31:39 -04:00
Raymond Yee ab371c0e64 turn the payment.Account.status into an enumeration (with choices) 2013-05-28 15:57:22 -07:00
Raymond Yee a3cc502924 get rid of AccountTest0
renamed notice to Credit Card Number Updated
actually save account in update_account_status
2013-05-20 13:58:21 -07:00
Raymond Yee ef8c27d6fa Fire off account_active notices only if Account is a new one 2013-05-09 08:54:00 -07:00
Raymond Yee 94a23b3adf delete AccountTest.get_transaction_level() 2013-05-08 19:03:32 -07:00
Raymond Yee b1a23c9183 Add sending of account_active notices -- though they are turned off by default 2013-05-08 18:15:33 -07:00
Raymond Yee db1ee70647 fixed up notice texts for account_expired
also made sure that user is properly passed to sender of notices
2013-04-26 10:50:28 -07:00
Raymond Yee a3127e8086 Trying to work around problems in old AccounTest 2013-04-12 11:13:26 -07:00
Raymond Yee 9cc2e3121e Merge branch 'master' into expiring_cc 2013-04-10 09:14:29 -07:00
Raymond Yee ed37463f35 debugging tests on ry-dev -- let's see how this runs on ry laptop 2013-03-20 21:56:37 +00:00
Raymond Yee aca38d66a1 Merge branch 'master' into expiring_cc
Conflicts:
	payment/tests.py
2013-03-20 09:41:30 -07:00
eric af8c3ff1fd merge from master 2013-03-19 10:02:06 -04:00
eric d3077c988b links should not point to http from https 2013-03-09 13:29:03 -05:00
eric 800d0ffdeb cleanup of css and js imports, also mapping 2013-03-08 14:16:24 -05:00
eric d6a8dedfaa mailchimp ops now example.org aware, test users, now all changed to example.org 2013-03-06 09:39:06 -05:00
Raymond Yee de96aa0755 Add task for 22nd of month for notifying expring cc 2013-03-04 11:19:13 -08:00
Raymond Yee 0174ef863f card expiring and expired notices firing now 2013-03-04 09:06:57 -08:00
Raymond Yee 3e3a24b7db in progress: a test for making sure changes in Account.status fires appropriate notices 2013-03-04 07:50:21 -08:00
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