Business::CPI (Common Payment Interface) é um módulo em Perl que define uma interface padrão para comunicação entre programas feitos em Perl e intermediários financeiros (que chamamos no CPI de gateways).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
so, we got this service subclass doing ACCEPT_CONTEXT and COMPONENT, right? | |
or two of them, or whatever | |
instances of that are generated while building the "default" container for your app | |
based on the components in your lib/ and whatnot | |
what you want to know is how to: | |
a) configure additional services in that container | |
super simple | |
container $default_container => as { more services }; | |
b) make component services depend on that | |
trickier, as i can't think of a nice way to "amend" service definitions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Big topics (design and hard to solve issues) | |
- Catalyst::Model::DBIC::Schema is broken because we build the service too early, | |
causing the COMPONENT method to be called early, breaking components which | |
build other components. | |
this: | |
sub COMPONENT { | |
... | |
*${appclass}::Model::TopLevel::GENERATED::ACCEPT_CONTEXT = sub { ... }; | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
# usage: | |
# mplayer $(perl watch.pl http://ics.webcast.uwex.edu/mediasite/Viewer/?peid=ceecb7a37e3f4dbbb13e7f5cc9f513291d) | |
my @parts = (shift =~ /\?peid=(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/); | |
local $" = '-'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user | |
name | |
login | |
password | |
user_role | |
user | |
role |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ telnet capesdw.capes.gov.br 80 | |
Trying 200.130.18.154... | |
Connected to capesdw.capes.gov.br. | |
Escape character is '^]'. | |
POST /gsa/search; HTTP/1.1 | |
Content-Type: application/x-www-form-urlencoded; charset=UTF-8 | |
Host: capesdw.capes.gov.br | |
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0 | |
Cookie: symfony=1o3nca5dm5lpnqmel1dkaaq1b4 | |
Content-Length: 22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Comecei a implementar a solução do problema que descrevo abaixo aqui: | |
https://github.com/andrewalker/p5-business-cpi/blob/master/lib/Business/CPI/Role/Receiver.pm | |
============= | |
Atualmente: | |
my $cpi = Business::CPI->new( | |
gateway => 'PayPal', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am andrewalker on github. | |
* I am andrewalker (https://keybase.io/andrewalker) on keybase. | |
* I have a public key whose fingerprint is 3013 472E FA53 8AFC 1B37 36D4 6158 780D 27C0 D33A | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCu4RFtuPQH0ynSDm7w7VrarNQHTjn4hvJkcCLajTDjz3EkoD+miMDcuZLqJb0y+DOSNEI4Y+8CrOS/hrw4mPohF250oOKkN5B3X9BpG2AAsKb3pfLYac64aJYDrEw78sRiIq+QzS1zC3w1gbN5anW/Z98CX2boT9f8XBiIZftqxKCJqXhWBXRca/0Yclawd3QVw22mBBxws924rOuRCQbmtjb0t8vngA3xhmrk9OAnfYEt0ROYsPGaHPo6XYW4CX2qH3ORjsqp/ikULU5i4DPVFfK2lw9I+Oe7UzX0+93N4BleTgx3TW0r9mcxlARxlSyLGXqyBIuNKLmBHQS1+csX andre@andrewalker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Hakyll | |
import Text.Pandoc | |
import Text.Pandoc.PDF (makePDF) | |
import qualified Data.ByteString.Lazy as B | |
import qualified Text.Pandoc.UTF8 as UTF8 | |
main = do | |
-- -- check for latex program | |
-- mbLatex <- findExecutable "pdflatex" | |
-- when (mbLatex == Nothing) $ |
OlderNewer