__author__ = 'eneldoserrata'

import requests

# TLS 1.2

tx_bpd_request = {
    "Channel":"EC",
    "Store":"39036480017",
    "CardNumber":"4012000077777777",
    "Expiration": "201701",
    "CVC": "201",
    "PosInputMode":"E-Commerce",
    "TrxType":"Sale",
    "Amount":"650730",
    "Itbis":"99264",
    "CurrencyPosCode":"$",
    "Payments":"1",
    "Plan":"0",
    "AcquirerRefData":"1",
    "RRN":None,
    "CustomerServicePhone":"809-111-2222",
    "OrderNumber":"",
    "ECommerceUrl":"www.miurl.com.do",
    "CustomOrderId":"ABC123"
}


res = requests.get("https://pruebas.azul.com.do/WebServices/JSON/default.aspx", data=tx_bpd_request,
                    headers={"content-type": "application/json", "Auth1": "cartone", "Auth2": "cartone"},
                    cert="/Users/eneldoserrata/PycharmProjects/bitbucket/marcos_odoo/marcos_addons/payment_bpd/test/cartone.pem")

import pdb;pdb.set_trace()