def METHOD_NAME(request, payment):
    x_fp_timestamp = str(int(time.time()))
    x_amount = "%.2f" % payment.amount
    x_fp_hash = get_fingerprint(str(payment.id), x_fp_timestamp, x_amount)
    x_logo_URL = get_setting('site', 'global', 'merchantlogo')
    if get_setting("site", "global", "merchantauthorizeonly"):
        x_type = 'AUTH_ONLY'
    else:
        x_type = 'AUTH_CAPTURE'
    params = {
              'x_fp_sequence':payment.id,
              'x_fp_timestamp':x_fp_timestamp,
              'x_fp_hash':x_fp_hash,
              'x_amount':x_amount,
              'x_version':'3.1',
              'x_login':settings.MERCHANT_LOGIN,
              'x_invoice_num':payment.invoice_num,
              'x_description':payment.description,
              'x_email_customer':"TRUE",
              'x_email':payment.email,
              'x_cust_id':payment.cust_id,
              'x_first_name':payment.first_name,
              'x_last_name':payment.last_name,
              'x_company':payment.company,
              'x_address':payment.address,
              'x_city':payment.city,
              'x_state':payment.state,
              'x_zip':payment.zip,
              'x_country':payment.country,
              'x_ship_to_first_name':payment.ship_to_first_name,
              'x_ship_to_last_name':payment.ship_to_last_name,
              'x_ship_to_company':payment.ship_to_company,
              'x_ship_to_address':payment.ship_to_address,
              'x_ship_to_city':payment.ship_to_city,
              'x_ship_to_state':payment.ship_to_state,
              'x_ship_to_zip':payment.ship_to_zip,
              'x_ship_to_country':payment.ship_to_country,
              'x_fax':payment.fax,
              'x_phone':payment.phone,
              'x_show_form':'PAYMENT_FORM',
              'x_logo_URL':x_logo_URL,
              'x_type': x_type
        }
    if settings.FIRSTDATA_USE_RELAY_RESPONSE:
        params.update({'x_relay_response':'TRUE',
                       'x_relay_url':payment.response_page,})
    form = PaymentForm(initial=params)
    return form