{ "info": { "author": "Getpaid Community", "author_email": "getpaid-dev@googlegroups.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Framework :: Zope3", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Office/Business :: Financial", "Topic :: Software Development :: Libraries" ], "description": "This package contains the core functionality of the getpaid framework.\n\n=======\nCHANGES\n=======\n\n0.9.2 (2011-07-06)\n------------------\n\n- Use getSite to get the store from the order workflow transition handler,\n rather than trying to acquire it from one of the cart items.\n [davisagli]\n\n- Remove obviously broken product and catalog modules.\n [davisagli]\n\n- Depend on zope.intid instead of zope.app.intid.\n [davisagli]\n\n0.9.1 (2010-06-29)\n------------------\n\n- made tax translatable, rebuilt and synced translation files,\n updated German translations\n [fRiSi]\n\n0.9.0 (2010-05-18)\n------------------\n\n- Prevent addition of recurring line items to a cart with non-recurring items,\n and vice versa.\n [jesses, alext]\n\n- Fix spelling of \"Verification\".\n [cewing]\n\n- Added ``is_recurring`` method to ShoppingCart to check whether the cart\n contains a recurring line item.\n [davisagli]\n\n- Fix exception handling in OrderManager's isValid method.\n [davisagli]\n\n- Add renewal_date index for orders.\n [jpg.rcom]\n\n- Add IRecurringPaymentContent interface.\n [jpg.rcom]\n\n- Update IRecurringLineItem to specify interval and total_occurrences\n attributes, instead of period.\n [jpg.rcom]\n\n0.8.0 (2010-04-07)\n------------------\n\n- Adjusted imports to add support for Zope 2.12, and remove support for\n Zope 2.9.\n [davisagli]\n\n0.7.5 (2009-07-07)\n------------------\n- Add ship and bill organization\n\n0.7.4 (2009-05-12)\n------------------\n\n- Add support for variable amount donations\n- Allow annotations on shopping cart\n\n0.7.3 (2009-03-13)\n------------------\n\n- updated portuguese translation [rafaelcrocha]\n\n0.7.2 (2008-12-30)\n------------------\n\n* Added 2 fixes (for when you use the shipping system):\n* gave a default value to the order.shipments, because\n it is never set up to anything otherwise and you can't\n access your order,\n* fixed the way we calculate the total, so that we have\n float numbers\n [lucielejard]\n\n0.7.1 (2008-11-24)\n------------------\n\n* Persisted and added Name on Card and Card Phone Num to orders listing\n viewlet. [ctxlken]\n* Persisted processor transaction id and last-4 digits of credit card to\n ZODB. Also, modified order-summary.pt to present these two fields.\n [ctxlken]\n* add: added some missing italian translations [bruno.ripa]\n* update getpaid.po and sync with all .po. add Japanese locales\n [cjj.ifpeople]\n* add: missing italian translations [bruno.ripa]\n\n\n0.7 (2008-08-29)\n----------------\n\n* Added buildout files and general text documents to project root.\n* removed setup.cfg\n* updated txt files so that restructured text works on pypi\n\nDetailed Documentation\n**********************\n\nOrder Management in GetPaid\n===========================\n\nGetpaid's core functionality is represented as an order management\nsystem. \n\nCreating an Order\n=================\n\n >>> from getpaid.core.order import Order\n >>> order = Order()\n\nCarts and Line Items\n====================\n\nAn order consists of line items. line items can come from a variety of\nsources, content space payables, gift certificates, ie. anything we \npotentially want to purchase:\n\n >>> from getpaid.core.item import LineItem\n >>> item = LineItem()\n \nLet's set some attributes expected on line items. The only system invariant\nhere is that item_id should be unique when referring to purchasing the same\nitem: \n\n >>> item.item_id = \"event-devtalk-2007-1\" \n >>> item.name = \"Event Registration\"\n >>> item.cost = 25.00\n >>> item.quantity = 5\n >>> item.description = \"Development Talk\"\n \nLine Items are stored in a line item container, such as a shopping cart\nof shipment:\n \n >>> from getpaid.core.cart import ShoppingCart\n >>> cart = ShoppingCart()\n >>> cart[ item.item_id ] = item\n\nwe can ask the cart how many items it has:\n\n >>> cart.size()\n 5\n\nLet's attach our cart to the order:\n\n >>> order.shopping_cart = cart\n\nand now we can ask the order, its total price:\n \n >>> from decimal import Decimal\n >>> order.getSubTotalPrice() == Decimal(\"125.0\")\n True\n\n[ xxx talk about products and payable line items here ??]\n\nCustomer Information\n====================\n\nWe need some additional information for an order to successfully process it:\n\n >>> from getpaid.core import payment\n >>> bill_address = payment.BillingAddress()\n >>> bill_address.bill_first_line = '1418 W Street NW'\n >>> bill_address.bill_city = 'Washington'\n >>> bill_address.bill_state = \"DC\"\n >>> bill_address.bill_country = \"US\"\n >>> bill_address.bill_postal_code = '20009'\n >>>\n >>> \n >>> contact_info = payment.ContactInformation()\n >>>\n >>> order.contact_information = contact_info\n >>> order.billing_address = bill_address\n\nIf we don't need to ship anything to the user, then we can forgo\nsetting a shipping address.\n\n\nIntrospection and Classification\n================================\n\nWhen we create an order, an order inspection component which\nsubscribes to the order created event, gets a chance to look at all\nthe contents of an order and modify it. The default inspector, will\nadd additional marker interfaces to the order to classify it based on\nits contents as a shippable order, donation order, etc. Based on these\nmarker interfaces and corresponding compnent registration, we can\nspecialize adapation of orders to workflows, payment processing as\nappropriate for a given order. \n\n >>> try:\n ... from zope.lifecycleevent import ObjectCreatedEvent\n ... except ImportError:\n ... from zope.app.event.objectevent import ObjectCreatedEvent\n >>> from zope.event import notify\n >>> notify( ObjectCreatedEvent( order ))\n >>> \n\nFinance Workflow\n================\n\nThe finance workflow\n\n\nPayment Processor Integration\n============================= \n\nWe payment processor integration to support multiple different\nservices and is workflow driven. We dispatch workflow events to a\nprocessor integration multi adapter which takes as context the order\nand the workflow. \n\n\nThe one public payment processor integration attribute on the order is\nthe payment processor id, which corresponds to the name that the\npayment processor adapter is registered on.\n\n\nIts also important to note that there are several varieties of\nasynchronous payment processors, which alsorequire corresponding\ncheckout user interface support, and callback url endpoints, which are\noutside of the scope of this example. These doctest examples require a\nsynchronous processor api.\n\n\nManaging Collections of Orders\n==============================\n\n\nQuerying Orders\n===============\n\n\nReporting on Orders\n===================\n\nWe use workflows to model the order lifecycle for finance and\nfulfillment. We can introspect orders to classify by them interface\nand adapt to the appropriate workflows. As a consequence we can support\nonline and shipping based from the same order management system.\nand support virtual delivery, and a shipping lifecycle. we\nutilize hurry.workflow to implement our workflows, one benefits to\nmake this lifecycle observable via event subscribers.\n\n\n\nline items are stored in line item containers, like a shopping cart,\nor shipment. a line item is unique within these containers\nbased on some unique attribute (at uid, or product sku).\n\n\ngetpaid internaly dispatches workflow changes to the appropriate\npayment processor for an order.\n\n\nbecause we can process workflows asynchronously, we can get pretty\ngood at synchronization / integration with other systems.\n\nan order has both a finance workflow and a fulfillment workflow\ndependent on its contained items. the finance workflow models things\nlike cc authorization for an order, and capture/charging an order.\n\nWorkflow Tests\n==============\n\nLet's first create an Order object to work with:\n\n >>> from getpaid.core.order import Order\n >>> testorder = Order()\n\nNow we'll test the order workflow...\n\nBefore we fire the 'create' transition we don't have a workflow states\nfor finance and fulfillment\n\n >>> state = testorder.fulfillment_state\n >>> print state\n None\n\n >>> state = testorder.finance_state\n >>> print state\n None\n\nFiring the 'create' transition in the finance workflow should put us \nin the REVIEWING state\n \n >>> testorder.finance_workflow.fireTransition('create')\n >>> state = testorder.finance_state\n >>> print state\n REVIEWING\n\nFiring some more transitions to test the finance workflow. \n\n >>> testorder.finance_workflow.fireTransition('authorize')\n >>> state = testorder.finance_state\n >>> print state\n CHARGEABLE\n\n\n >>> testorder.finance_workflow.fireTransition('charge-chargeable')\n >>> state = testorder.finance_state\n >>> print state\n CHARGING\n\nFiring the 'create' transition in the fulfillment workflow should put us \nin the REVIEWING state\n\n >>> testorder.fulfillment_workflow.fireTransition('create')\n >>> state = testorder.fulfillment_state\n >>> print state\n NEW\n\nTesting the fulfillment workflow for a delivered order. We need to re-cast \nthe testorder object as we cannot transition back from \n\n >>> testorder = Order()\n >>> testorder.fulfillment_workflow.fireTransition('create')\n >>> state = testorder.fulfillment_state\n >>> print state\n NEW\n\n >>> testorder.fulfillment_workflow.fireTransition('process-order')\n >>> state = testorder.fulfillment_state\n >>> print state\n PROCESSING\n\n >>> testorder.fulfillment_workflow.fireTransition('deliver-processing-order')\n >>> state = testorder.fulfillment_state\n >>> print state\n DELIVERED\n\nTesting the fulfillment workflow for a cancelled order. We need to re-cast \nthe testorder object as we cannot transition back from DELIVERED state.\n\n >>> testorder2 = Order()\n\n >>> testorder2.fulfillment_workflow.fireTransition('create')\n >>> state = testorder2.fulfillment_state\n >>> print state\n NEW\n\n >>> testorder2.fulfillment_workflow.fireTransition('process-order')\n >>> state = testorder2.fulfillment_state\n >>> print state\n PROCESSING\n\n >>> testorder2.fulfillment_workflow.fireTransition('cancel-order')\n >>> state = testorder2.fulfillment_state\n >>> print state\n WILL_NOT_DELIVER\n\n\nOrder Id Management\n===================\n\nEach order needs an Id with a strong requirement on it being unique\nand non-guessable. You can get a new, nonguessable id with a\nreasonable guarantee of it being unique by calling newOrderId().\n\n >>> from zope import component\n >>> from getpaid.core import interfaces\n >>> from getpaid.core.order import Order\n >>> order_manager = component.getUtility( interfaces.IOrderManager )\n >>> order = Order()\n >>> order.order_id = order_manager.newOrderId()\n >>> order_manager.store( order )\n\nnow that the order is stored, no amount of calling newOrderId should\nreturn the same id. I can't actually test for uniqueness or\nnonguessability, can I?\n\n >>> for i in xrange(10000):\n ... assert(order_manager.newOrderId() != order.order_id)\n\nbut on the other hand, I *can* test that if I create an order with the\nsame id as an existing order, things will fail:\n\n >>> new_order = Order()\n >>> new_order.order_id = order.order_id\n >>> try:\n ... order_manager.store( new_order )\n ... except Exception, e:\n ... if e.__class__.__name__ in ('KeyError', 'DuplicationError'):\n ... print 'duplicate'\n duplicate\n\nDownload\n**********************", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://code.google.com/p/getpaid", "keywords": null, "license": "ZPL2.1", "maintainer": null, "maintainer_email": null, "name": "getpaid.core", "package_url": "https://pypi.org/project/getpaid.core/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/getpaid.core/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://code.google.com/p/getpaid" }, "release_url": "https://pypi.org/project/getpaid.core/0.9.2/", "requires_dist": null, "requires_python": null, "summary": "Core ecommerce functionality for zope and python projects", "version": "0.9.2" }, "last_serial": 792356, "releases": { "0.3.0": [], "0.6.0": [ { "comment_text": "", "digests": { "md5": "13908e8851377097af782d61992999d7", "sha256": "e6663d6d07992b15a823b2887b303123d1c11812c97c3ffa5c1a19846d777361" }, "downloads": -1, "filename": "getpaid.core-0.6.0-py2.4.egg", "has_sig": false, "md5_digest": "13908e8851377097af782d61992999d7", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 157165, "upload_time": "2008-05-13T05:22:47", "url": "https://files.pythonhosted.org/packages/ed/5b/cf71da68cf63a50dd8893904211f1913dc93a5143f64a13de1e289adf6ca/getpaid.core-0.6.0-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "f28eae2bea4084ec49bec344b8ff189e", "sha256": "e6539daf820101413758a9de5e547ee1714b665c0513a0374122b6bfdf912552" }, "downloads": -1, "filename": "getpaid.core-0.6.0-py2.5.egg", "has_sig": false, "md5_digest": "f28eae2bea4084ec49bec344b8ff189e", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 156230, "upload_time": "2008-05-13T05:21:57", "url": "https://files.pythonhosted.org/packages/db/c0/366fbbecbe7413fc92d0c2aff0a02764304c1b6a4b7a36d40254bb2a736e/getpaid.core-0.6.0-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "77acd3859f546fdf8c8258a5a3dbd4e4", "sha256": "f12a25055cd1b95eccc3f8fad05e76930d7ca09727681db9f4b53662deec9d27" }, "downloads": -1, "filename": "getpaid.core-0.6.0.tar.gz", "has_sig": false, "md5_digest": "77acd3859f546fdf8c8258a5a3dbd4e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 55461, "upload_time": "2008-05-13T05:21:58", "url": "https://files.pythonhosted.org/packages/d9/82/3e3666d4e85ff1c49d5691c11b10b3b153436860b5b8cbc8718e868472db/getpaid.core-0.6.0.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "4b64429f2887fd67836d2e0db7f3035c", "sha256": "8309da90dc962f70a500dc77a493d624e4290533e55f3a0334f9d88c7360056c" }, "downloads": -1, "filename": "getpaid.core-0.7.tar.gz", "has_sig": false, "md5_digest": "4b64429f2887fd67836d2e0db7f3035c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 59675, "upload_time": "2008-08-29T21:07:17", "url": "https://files.pythonhosted.org/packages/6e/2d/495ec3ec0c6b8ab8a7161cefe336943f769a5b6baf447e0c979a6ca95fb9/getpaid.core-0.7.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "eb398af5b946810b61f675f3887b5296", "sha256": "bc22ef5ffab193d6d8c75f4879f47590a9777988dd3760c68e553b0f812da83b" }, "downloads": -1, "filename": "getpaid.core-0.7.1.tar.gz", "has_sig": false, "md5_digest": "eb398af5b946810b61f675f3887b5296", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 58209, "upload_time": "2008-11-25T02:38:58", "url": "https://files.pythonhosted.org/packages/28/03/319d20b1d8053ab267eafdbaf8fc96b4e0d2bdc6b48253fe17a0d2b6a977/getpaid.core-0.7.1.tar.gz" } ], "0.7.2": [ { "comment_text": "", "digests": { "md5": "dcd08bbc3359adc03207ee22100acdb3", "sha256": "ba7e05bee837e71a19d0c285935bb86fc1421911b2b08896af06759f30211549" }, "downloads": -1, "filename": "getpaid.core-0.7.2.tar.gz", "has_sig": false, "md5_digest": "dcd08bbc3359adc03207ee22100acdb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 58391, "upload_time": "2008-12-30T22:56:14", "url": "https://files.pythonhosted.org/packages/7c/a9/9b965a9eafc9862ddfbfae511117d9a83eef6af59d5f99eb0ec23de7e2c8/getpaid.core-0.7.2.tar.gz" } ], "0.7.3": [ { "comment_text": "", "digests": { "md5": "844b002dfc68a42546077c54be862823", "sha256": "1dac4f55eb78d2e7757074bf67b96f157c716f8919c17eecc921ea8a96df8064" }, "downloads": -1, "filename": "getpaid.core-0.7.3.tar.gz", "has_sig": false, "md5_digest": "844b002dfc68a42546077c54be862823", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 58921, "upload_time": "2009-03-13T19:43:38", "url": "https://files.pythonhosted.org/packages/fa/47/f0c4b39eb7b6d287a1af708029156ea5ba353aaec4d112069993ee2b8f98/getpaid.core-0.7.3.tar.gz" } ], "0.7.4": [ { "comment_text": "", "digests": { "md5": "d0c28332e22046f515a0b12cc6fa0832", "sha256": "f6b16eb18514907650bfab81e4b51d7f89b1f5724995a5761322e2ece26c5dab" }, "downloads": -1, "filename": "getpaid.core-0.7.4.tar.gz", "has_sig": false, "md5_digest": "d0c28332e22046f515a0b12cc6fa0832", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 68176, "upload_time": "2009-05-13T00:20:39", "url": "https://files.pythonhosted.org/packages/55/d7/2fb56d5f76267eee9ea76ee3ada3877adf489ab6484a979001f15322f8e2/getpaid.core-0.7.4.tar.gz" } ], "0.7.5": [ { "comment_text": "", "digests": { "md5": "805a0cee003fb5a43f98ffffc30db0a4", "sha256": "f87a9f1855fe9b6379d28e885a6e33c778c8111f09107da017710bd6ee173d17" }, "downloads": -1, "filename": "getpaid.core-0.7.5.tar.gz", "has_sig": false, "md5_digest": "805a0cee003fb5a43f98ffffc30db0a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 70381, "upload_time": "2009-07-08T01:02:33", "url": "https://files.pythonhosted.org/packages/cc/d8/484263fc7e49522d0561f718c1d0423997e020bc9d6942181f4c4998ed59/getpaid.core-0.7.5.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "40d2f330dfc8bbc3532cfe0d336e20c2", "sha256": "a8ae0e86fcd49d6d8f608c2db0594dc7bf22a0ad4378e3f4e1b3965eba07497a" }, "downloads": -1, "filename": "getpaid.core-0.8.0.zip", "has_sig": true, "md5_digest": "40d2f330dfc8bbc3532cfe0d336e20c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 148103, "upload_time": "2010-04-07T23:52:58", "url": "https://files.pythonhosted.org/packages/ec/cb/a9f506a3a1dff664ab9bef7256dbe771245d24e8bbbe27379b8b31528388/getpaid.core-0.8.0.zip" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "75cf56f788321f152e21d52930547eeb", "sha256": "4811951e67e365dfb7e1c00e79fff199ec8824f44a851b809c130e63ce7a7d2b" }, "downloads": -1, "filename": "getpaid.core-0.9.0.zip", "has_sig": true, "md5_digest": "75cf56f788321f152e21d52930547eeb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 160613, "upload_time": "2010-05-19T01:28:39", "url": "https://files.pythonhosted.org/packages/af/ba/e1e15805afb750f21704eb09008198be8680c2ee4f3f1595e04e1632cab9/getpaid.core-0.9.0.zip" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "3ced9a336081253f4e9378be40f1b017", "sha256": "d421cfb7845ae10d5491b3150020c3e3691a420ab4b020b47d566fa79875b7a7" }, "downloads": -1, "filename": "getpaid.core-0.9.1.tar.gz", "has_sig": false, "md5_digest": "3ced9a336081253f4e9378be40f1b017", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 75829, "upload_time": "2010-06-29T14:22:03", "url": "https://files.pythonhosted.org/packages/66/79/1525afe6a5649abfdf1944334ebe7637f2f9a3d65199b38e94fb6782364f/getpaid.core-0.9.1.tar.gz" } ], "0.9.2": [ { "comment_text": "", "digests": { "md5": "0c1a87424cdd782fc3388851c736d8e3", "sha256": "949152ae3dfa6b74cad02a59c6eefb6d7fd07642204afa8f755e40ee7eb41cd1" }, "downloads": -1, "filename": "getpaid.core-0.9.2.zip", "has_sig": false, "md5_digest": "0c1a87424cdd782fc3388851c736d8e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 159802, "upload_time": "2011-07-06T23:31:38", "url": "https://files.pythonhosted.org/packages/84/e8/23df3f9adb25fbd5bd81228849b58cfbc8a3f3b52b6bd2954279a231554a/getpaid.core-0.9.2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0c1a87424cdd782fc3388851c736d8e3", "sha256": "949152ae3dfa6b74cad02a59c6eefb6d7fd07642204afa8f755e40ee7eb41cd1" }, "downloads": -1, "filename": "getpaid.core-0.9.2.zip", "has_sig": false, "md5_digest": "0c1a87424cdd782fc3388851c736d8e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 159802, "upload_time": "2011-07-06T23:31:38", "url": "https://files.pythonhosted.org/packages/84/e8/23df3f9adb25fbd5bd81228849b58cfbc8a3f3b52b6bd2954279a231554a/getpaid.core-0.9.2.zip" } ] }