Пример #1
0
def billing(request):
    """
    Call the Bango API to begin a payment transaction.

    The resulting billingConfigId can be used on the query
    string in a URL to initiate a user payment flow.

    We are able to configure a few parameters that come
    back to us on the Bango success URL query string.
    Here are some highlights:

    **config[REQUEST_SIGNATURE]**
        This arrives as **MozSignature** in the redirect query string.

    **externalTransactionId**
        This is set to solitude's own transaction_uuid. It arrives
        in the redirect query string as **MerchantTransactionId**.
    """

    view = BangoResource()
    try:
        serial, form = view.process(
            serial_class=SellerProductBangoOnly,
            form_class=CreateBillingConfigurationForm,
            request=request)
    except ProcessError, exc:
        return exc.response
Пример #2
0
def billing(request):
    """
    Call the Bango API to begin a payment transaction.

    The resulting billingConfigId can be used on the query
    string in a URL to initiate a user payment flow.

    We are able to configure a few parameters that come
    back to us on the Bango success URL query string.
    Here are some highlights:

    **config[REQUEST_SIGNATURE]**
        This arrives as **MozSignature** in the redirect query string.

    **externalTransactionId**
        This is set to solitude's own transaction_uuid. It arrives
        in the redirect query string as **MerchantTransactionId**.
    """

    view = BangoResource()
    try:
        serial, form = view.process(serial_class=SellerProductBangoOnly,
                                    form_class=CreateBillingConfigurationForm,
                                    request=request)
    except ProcessError, exc:
        return exc.response
Пример #3
0
def rating(request):
    view = BangoResource()
    view.error_lookup = {
        'INVALID_RATING': 'rating',
        'INVALID_RATING_SCHEME': 'ratingScheme',
    }
    try:
        serial, form = view.process(serial_class=SellerProductBangoOnly,
                                    form_class=UpdateRatingForm,
                                    request=request)
    except ProcessError, exc:
        return exc.response
Пример #4
0
def bank(request):
    view = BangoResource()
    view.error_lookup = {
        'INVALID_COUNTRYISO': 'bankAddressIso',
    }

    try:
        serial, form = view.process(
            serial_class=SellerBangoOnly,
            form_class=CreateBankDetailsForm,
            request=request)
    except ProcessError, exc:
        return exc.response
Пример #5
0
def rating(request):
    view = BangoResource()
    view.error_lookup = {
        'INVALID_RATING': 'rating',
        'INVALID_RATING_SCHEME': 'ratingScheme',
    }
    try:
        serial, form = view.process(
            serial_class=SellerProductBangoOnly,
            form_class=UpdateRatingForm,
            request=request)
    except ProcessError, exc:
        return exc.response
Пример #6
0
def premium(request):
    view = BangoResource()
    view.error_lookup = {
        'INVALID_COUNTRYISO': 'currencyIso',
    }

    try:
        serial, form = view.process(
            serial_class=SellerProductBangoOnly,
            form_class=MakePremiumForm,
            request=request)
    except ProcessError, exc:
        return exc.response