Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8611431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:22:28+00:00 2026-06-12T04:22:28+00:00

I have to use a perl Script to interface to verifReceipt for in App

  • 0

I have to use a perl Script to interface to verifReceipt for in App Purchase on iOS.
I use too phoneGap 1.5.0

1/ When I try to use external url it does not work.
2/ I try to use a perl script interface between phonegap html page and itunes.
I do not understand how to send data. I try this :

$val contains JSON object with receiptvalue and password, receiving from phonegap.

my %transformfields = (
            "receipt-data"       => $val,
            );

my $ua = LWP::UserAgent->new;

my $req = POST($urlsend,
    Content_Type => 'application/json ; charset=UTF-8',
    Content => \%transformfields,
    #Content => $val,
    );



my $res = $ua->request($req);

I have always this error : 21002 java.lang.NullPointerException
I do not understand how is this possible to send data with perl script.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:22:30+00:00Added an answer on June 12, 2026 at 4:22 am

    I have problems with json encode and understanding how I receive data from phonegap plugins.

    For help :
    Phongap plugins returns transactionReceipt in Base64.
    Do not encode password in Base64 too.

    my %transformfields = ("receipt-data" => $val , "password" => $sharedsecretpass ) ;
    my $jsonval = encode_json (\%transformfields);
    
    print "Content-Type: text/html \n\n";
    
    #my $urlsend="https://buy.itunes.apple.com/verifyReceipt" ;
    my $urlsend="https://sandbox.itunes.apple.com/verifyReceipt" ;
    
    my $req = POST($urlsend,
        Content_Type => 'application/x-www-form-urlencoded ; charset=utf-8',
        Content => $jsonval,
        );
    
    my $ua = LWP::UserAgent->new;
    my $res = $ua->request($req);
    
    if ($res->is_success)
    {
        #print "cgi Content : " . $res->content . "<br />\n";
        my $retour = decode_json( $res->content );
        if ($retour->{'status'} eq "0")
        {
                print "--OK--<br />\n";
                print $retour->{receipt}->{product_id} . "<br />";
                print $retour->{receipt}->{transaction_id} . "<br />";
                print $retour->{receipt}->{purchase_date} . "<br />";
                print $retour->{receipt}->{expires_date} . "<br />";
    
                #$res->content
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Perl script I wrote for my own personal use that fetches
I have this script: #!/var/home/cherry/opt/perl use Test::More; use DBI; use Test::mysqld; use Data::Dumper; my
I have created a simple perl script. The only thing it does is waiting
I have written a Perl script: #!/usr/bin/perl use strict; use warnings; my $file_name; my
I have the following code in in a Perl script I'm writing: #!/usr/bin/perl use
I have a mod_perl script: use strict; use warnings FATAL => 'all'; use 5.010001;
i have something like: #!/usr/bin/perl use strict; use warnings; use CGI::Simple; use DBI; my
I have the following code #!/usr/bin/perl use Tie::File; tie my @last_id, 'Tie::File', 'last_id.txt' or
Could you please have a look at my code below. #!C:\Perl\bin\perl.exe use strict; use
I have 2 perl modules every module use the second one i.e Module1.pm use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.