Skip to content

Instantly share code, notes, and snippets.

View andymckay's full-sized avatar

Andy McKay andymckay

View GitHub Profile
top_opener.modalFromURL(thanks_url, {'callback': function() {
purchases.thanks(top_opener);
}});
thanks: function(win) {
console.log(this);
console.log($(win.document).closest('body'));
},
[19/Oct/2011 11:53:14] "GET /en-US/firefox/users/purchase/start/app-5 HTTP/1.0" 200 720
{'actionType': 'PAY',
'cancelUrl': u'http://addons.mozilla.local/en-US/firefox/addon/app-5/purchase/cancel?realurl=None&uuid=1c58b1821ee0562140d0e45374ef5e25',
'currencyCode': 'USD',
'ipnNotificationUrl': u'http://addons.mozilla.local/services/paypal',
'memo': u'Purchase of Manifest Checker',
'receiverList.receiver(0).amount': '1.99',
'receiverList.receiver(0).email': u'[email protected]',
'receiverList.receiver(0).invoiceID': 'mozilla-1c58b1821ee0562140d0e45374ef5e25',
'receiverList.receiver(0).paymentType': 'DIGITALGOODS',
mysql> select app_slug, slug from addons;
+------------------+-----------------+
| app_slug | slug |
+------------------+-----------------+
| NULL | status-watch |
| NULL | github-bugzilla |
| NULL | sample-add-on |
| manifest-checker | app-5 |
+------------------+-----------------+
>>> from django.views import debug
>>> settings = debug.get_safe_settings()
>>> settings['SECRET_KEY']
'********************'
>>> settings['USE_I18N']
True
File "/Users/andy/sandboxes/zamboni/apps/versions/models.py", line 90, in from_upload
File.from_upload(upload, v, platform, parse_data=data)
File "/Users/andy/sandboxes/zamboni/apps/files/models.py", line 160, in from_upload
if validation['metadata'].get('requires_chrome'):
KeyError: 'metadata'
======================================================================
FAIL: test_loggedout_notpurchased (zamboni.apps.addons.tests.test_views.TestPaypalStart)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/andy/sandboxes/zamboni/../zamboni/apps/addons/tests/test_views.py", line 491, in test_loggedout_notpurchased
assert pq(res.content).find('.paypal.button').length
AssertionError
======================================================================
FAIL: test_loggedout_purchased (zamboni.apps.addons.tests.test_views.TestPaypalStart)
from django.shortcuts import get_object_or_404
import amo
app_slug = 'steamcube-1'
get_object_or_404(Addon, type=amo.ADDON_WEBAPP, app_slug=app_slug, disabled_by_user=False, status__in=amo.LISTED_STATUSES)
from django.shortcuts import get_object_or_404
import amo
app_slug = 'test-webapp-2'
get_object_or_404(Addon, type=amo.ADDON_WEBAPP, app_slug=app_slug, disabled_by_user=False, status__in=amo.VALID_STATUSES)
Traceback (most recent call last):
File "/Users/andy/sandboxes/zamboni/vendor/src/django/django/core/servers/basehttp.py", line 283, in run
self.result = application(self.environ, self.start_response)
File "/Users/andy/sandboxes/zamboni/vendor/src/django/django/contrib/staticfiles/handlers.py", line 68, in __call__
return self.application(environ, start_response)
File "/Users/andy/sandboxes/zamboni/vendor/src/django/django/core/handlers/wsgi.py", line 272, in __call__
response = self.get_response(request)
--- a/apps/paypal/__init__.py
+++ b/apps/paypal/__init__.py
@@ -52,12 +52,13 @@ def add_receivers(chains, email, amount, uuid):
'receiverList.receiver(%s).email' % number: destination,
'receiverList.receiver(%s).amount' % number: str(this),
'receiverList.receiver(%s).paymentType' % number: 'DIGITALGOODS',
+ 'receiverList.receiver(%s).primary' % number: 'false',
})
result.update({
'receiverList.receiver(0).email': email,