# This example uses the official LaterPay Python client library from pypi.# You can find it here: https://github.com/laterpay/laterpay-client-python# To get started quickly, run:# $ virtualenv example# $ example/bin/pip install laterpay-client# $ example/bin/python#fromlaterpayimportLaterPayClient,ItemDefinition# get us a LaterPay clientlpc=LaterPayClient("your merchant-id","your API key",api_root="https://api.uselaterpay.com",web_root="https://web.uselaterpay.com",)i=ItemDefinition(item_id="spring-fundraising",pricing="USD500",url="http://myorg.net/your-spring-campaign/",title="Spring Fundraising Event for MyOrg",item_type="contribution")# Creates a dialog URL for a contribution. Historically, these are called# "buy" instead of "pay now", and "add" instead of "pay later". The# `is_permalink` option means that the link will not expire -- normally# LaterPay links expire after a certain amount of time.pay_now_url=lpc.get_buy_url(i,is_permalink=True)pay_later_url=lpc.get_add_url(i,is_permalink=True)