st;
use Plack::Util::Accessor qw(route method path receipt_data allow_sandbox shared_secret);
use JSON;
use Try::Tiny;
use Furl;
sub prepare_app {
my $self = shift;
$self->allow_sandbox( $se
$params{password} = $self->shared_secret if $self->shared_secret;
my $receipt_data = encode_json (\%params);
my $res;
$res = $self->_post_receipt_to_itunes( 'production', $receipt_data,
> 'application/json'], # headers
$receipt_data, # form data (HashRef/FileHandle are also okay)
);
return [200, ['Content-Type' => 'application/json'], [$res->cont