I hereby claim:
- I am jogam5 on github.
- I am josegabriel (https://keybase.io/josegabriel) on keybase.
- I have a public key ASBEm05Qss9Dhsk25M8dh70YZC21cmVzl0a3A42XXA-C5Ao
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| set nocompatible " be iMproved, required | |
| filetype off " required | |
| set bs=2 | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| " alternatively, pass a path where Vundle should install plugins | |
| "call vundle#begin('~/some/path/here') |
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "log" | |
| "os" | |
| ) | |
| // readLines reads a whole file into memory |
| Verifying my Blockstack ID is secured with the address 1NytQ9CtN8gVxsSDVzMptoPpXdsTC9g1u9 https://explorer.blockstack.org/address/1NytQ9CtN8gVxsSDVzMptoPpXdsTC9g1u9 |
| skip_before_action :verify_authenticity_token, only: [:webhook] #si usas Rails4 | |
| require 'compropago' | |
| def webhook | |
| event_json = JSON.parse(request.body.read) | |
| Compropago.api_key = ENV['COMPROPAGO_PUBLIC_API_KEY'] | |
| begin | |
| Compropago::Charge.create({ product_price: event_json["total_price"], | |
| product_name: event_json["order_number"].to_s, |
| <form action="https://www.compropago.com/comprobante" method="post"> | |
| <input type="hidden" name="public_key" value="TU_API_KEY"> | |
| <input type="hidden" name="order_price" value="12.00"> | |
| <input type="hidden" name="order_name" value="Home Theater HSP"> | |
| <input type="hidden" name="order_id" value=""> | |
| <input type="hidden" name="customer_name" value=""> | |
| <input type="hidden" name="customer_email" value=""> | |
| <input type="hidden" name="customer_phone" value=""> | |
| <input type="image" src="https://www.compropago.com/assets/payment-green-btn.png" border="0" name="submit" alt="Pagar con ComproPago"> | |
| </form> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' /> | |
| </head> | |
| <body> | |
| <h1>Hi!</h1> | |
| <p> | |
| There's a new email from: <%= @name %> with email: <%= @email %>.<br> | |
| </p> |
| require "net/http" | |
| require "uri" | |
| uri = URI.parse("http://example.com/search") | |
| # Shortcut | |
| response = Net::HTTP.post_form(uri, {"q" => "My query", "per_page" => "50"}) | |
| # Full control | |
| http = Net::HTTP.new(uri.host, uri.port) |
| <% @products.each do |product| %> | |
| <p><b><%= product.name %></b> | $<%= product.price %></p> | |
| <p><%= product.description %></p> | |
| <%= form_tag("http://compropago.com/comprobante") do %> | |
| <%= hidden_field :param_name, 'param_value', {:name => "product_id", :value => product.id }%> | |
| <%= hidden_field :param_name, 'param_value', {:name => "public_key", :value => "XXXXXXXXXX"}%> | |
| <%= hidden_field :param_name, 'param_value', {:name => "product_price", :value => product.price.to_f }%> | |
| <%= hidden_field :param_name, 'param_value', {:name => "product_name", :value => product.name }%> | |
| <%= hidden_field :param_name, 'param_value', {:name => "customer_name", :value => User.find(1).name }%> | |
| <%= hidden_field :param_name, 'param_value', {:name => "customer_email", :value => User.find(1).email }%> |