Beispiel #1
0
def googlecheckout_start():
    set_user_currency("GBP")

    basket, total = get_basket()
    payment = add_payment_and_tickets(GoogleCheckoutPayment)
    if not payment:
        flash("Your session information has been lost. Please try ordering again.")
        return redirect(url_for("tickets"))

    app.logger.info("User %s created GoCardless payment %s", current_user.id, payment.id)
    return googlecheckout_send(payment, total)
Beispiel #2
0
def gocardless_start():
    set_user_currency("GBP")

    payment = add_payment_and_tickets(GoCardlessPayment)
    if not payment:
        flash("Your session information has been lost. Please try ordering again.")
        return redirect(url_for("tickets"))

    app.logger.info("User %s created GoCardless payment %s", current_user.id, payment.id)

    bill_url = payment.bill_url("Electromagnetic Field Tickets")

    return redirect(bill_url)
Beispiel #3
0
def set_currency():
    if request.form['currency'] not in ('GBP', 'EUR'):
        abort(400)

    set_user_currency(request.form['currency'])
    return redirect(url_for('tickets_choose'))