Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a120868317
Fetching contributors…

Cannot retrieve contributors at this time

file 35 lines (32 sloc) 0.921 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from pyvows import Vows, expect
from locaweb_gateway import LocawebGateway
import locaweb_gateway

locaweb_gateway.environment = 'unknown'

def create_params(payment_service):
    params = {
      "token": "3a5bbed0-50d4-012f-8d73-0026bb5a6240",
      "transacao": {
        "url_retorno": 'http://mystore.com/return',
        "pedido": {
          "numero":"654",
          "total":"100.00",
          "moeda":"real",
          "descricao":"My Camaro car!"
        },
        "pagamento":{
            "bandeira":"visa",
            "meio_pagamento": payment_service,
            "cartao_numero":"4012001037141112",
            "cartao_cvv":"973",
            "parcelas":"1",
            "tipo_operacao":"credito_a_vista",
            "cartao_validade":"082015"
        },
        "comprador":{
          "nome": "Bruna da Silva"
        }
      }
    }
    return params
Something went wrong with that request. Please try again.