Métodos de pago para chile y el mundo
-
Upload
sebastian-gamboa -
Category
Documents
-
view
332 -
download
0
description
Transcript of Métodos de pago para chile y el mundo
![Page 1: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/1.jpg)
MÉTODOS DE PAGO PARACHILE Y EL MUNDO
![Page 2: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/2.jpg)
SEBA GAMBOA
github.com/sagmortwitter.com/sagmor
![Page 3: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/3.jpg)
COBRAR EN LATINOAMERICA ES UN PARTOEn serio si pueden evitarlo, haganlo!
![Page 4: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/4.jpg)
AWWW, STRIPE...Stripe.api_key = "sk_test_mkGsLqEW6SLnZa487HYfJVLf"
Stripe::Charge.create( amount: 400, currency: "usd", card: { name: "John Doe", number: 4111111111111111, exp_month: 1, exp_year: 2014, cvc: 123 }, description: "Give me the money!")
![Page 5: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/5.jpg)
AWWW, STRIPE...$ curl https://api.stripe.com/v1/charges \ -u "sk_test_mkGsLqEW6SLnZa487HYfJVLf:" \ -d "amount=400" \ -d "currency=usd" \ -d "card[name]=John Doe" \ -d "card[number]=4111111111111111" \ -d "card[exp_month]=1" \ -d "card[exp_year]=2014" \ -d "card[cvc]=123" \ -d "description=Mum me can charge from thy terminal!"
![Page 6: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/6.jpg)
"US ONLY" :(Pero he oido de excepciones ;)
![Page 7: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/7.jpg)
PAYPAL TO THE RESCUE
![Page 8: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/8.jpg)
ALL NEW APIcurl -v https://api.sandbox.paypal.com/v1/payments/payment \-H 'Content-Type:application/json' \-H 'Authorization:Bearer EOjEJigcsRhdOgD7_76lPfrr45UfuI43zzNzTktUk1MK' \-d '{ "intent":"sale", "redirect_urls":{ "return_url":"http://return URL here", "cancel_url":"http://cancel URL here" }, "payer":{ "payment_method":"paypal" }, "transactions":[ { "amount":{ "total":"7.47", "currency":"USD" }, "description":"This is the payment transaction description." } ]}'
https://developer.paypal.com/webapps/developer/docs/integration/web/accept-paypal-payment/
![Page 9: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/9.jpg)
SHOW ME THE MONEY!Retira tu platita con Retiros Multicaja
https://www.multicaja.cl/retiros/
![Page 10: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/10.jpg)
A VECES NA' QUE HACERLEAceptar débito, aceptar CLP
![Page 11: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/11.jpg)
CHAN, CHAN, CHAAAAAAANN!!!!!
![Page 12: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/12.jpg)
WHAT IF!No CGIs
![Page 13: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/13.jpg)
include TBK@payment = Webpay::Payment.new({ amount: 10_000, order_id: 1234, success_url: webpay_success_url, confirmation_url: webpay_confirmation_url failure_url: webpay_failure_url})
redirect_to @payment.redirect_url
http://sagmor.com/tbk
![Page 14: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/14.jpg)
INICIAR UN PAGOclass WebpayController < ApplicationController def pay @payment = TBK::Webpay::Payment.new({ amount: ORDER_AMOUNT, order_id: ORDER_ID, success_url: webpay_success_url, # Webpay can only access the HTTP protocol to a direct IP address (keep that in mind) confirmation_url: webpay_confirmation_url(host: SERVER_IP_ADDRESS, protocol: 'http' failure_url: webpay_failure_url # success_url is used by default })
# Redirect the user to Webpay redirect_to @payment.redirect_url endend
![Page 15: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/15.jpg)
CONFIRMAR EL PAGOclass WebpayController < ApplicationController def confirmation @confirmation = TBK::Webpay::Confirmation.new(request.raw_post)
if ... # confirmation is invalid for some reason (wrong order_id or amount, double payment, etc...) render text: @confirmation.reject return # reject and stop execution end
if @confirmation.success? # EXITO! # perform everything you have to do here. end
# Acknowledge payment render text: @confirmation.acknowledge end
end
![Page 16: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/16.jpg)
¿FUNCIONA?creo que $500.000.000+ procesados de esta forma lo
demuestran
![Page 17: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/17.jpg)
PENDIENTESLogger compatible con CGIs (Pa' que transbank no webee)
github.com/sagmor/tbk/issues
![Page 18: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/18.jpg)
'U NO LIKING USING RUBY?MEESA SORRY :(
1. https://github.com/sagmor/tbk/tree/master/lib/tbk/webpay
2. http://sagmor.com/rants/technical/webpay-communication-protocol/
![Page 19: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/19.jpg)
¡HACK TRANSBANK!Tranquilos no ese tipo de hacking ;)
![Page 20: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/20.jpg)
ALGUIEN DIJO "TRANSBANK DEVELOPER NETWORK"?Alguien les tiene que hacer la pega parece
![Page 21: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/21.jpg)
ISSUE #16https://github.com/sagmor/tbk/issues/16
![Page 22: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/22.jpg)
Y LATINOAMERICA?Bastante menos documentadas pero con interfaz similar
github.com/sagmor/pagosonlinegithub.com/sagmor/pag_segurogithub.com/sagmor/mercado_pago
![Page 23: Métodos de pago para chile y el mundo](https://reader033.fdocument.pub/reader033/viewer/2022050919/548129a5b4af9fce158b5e7a/html5/thumbnails/23.jpg)
MUCHAS GRACIAS¿PREGUNTAS?