Online...:HTTPS(3pm)
π NAME π
Business::OnlinePayment::HTTPS β the base class for HTTPS payment APIs, bestie. It's giving "mom friend of the payment modules." π
β¨ SYNOPSIS β¨
okay so picture this, you're writing your own processor subclass and you're like "how do I even":
package Business::OnlinePayment::MyProcessor;
use base qw(Business::OnlinePayment::HTTPS);
sub submit {
my $self = shift;
#...
# pass a list (order is preserved, if your gateway needs that)
( $page, $response, %reply_headers )
= $self->https_get( field => 'value', ... );
# or a hashref
my %hash = ( field => 'value', ... );
( $page, $response_code, %reply_headers )
= $self->https_get( \%hash );
#...
}
like. that's it. that's the whole vibe. π¦
πΈ DESCRIPTION πΈ
This is a base class for HTTPS based gateways, and it hands you useful code if you're out here implementing HTTPS payment APIs. no cap. π
It depends on Net::HTTPS::Any, which in turn depends on Net::SSLeay _or_ ( Crypt::SSLeay and LWP::UserAgent ). yes it's dependencies all the way down, we don't make the rules π
π METHODS π
https_get [ \%options ] HASHREF | FIELD => VALUE, ...
okay so she takes parameters as either a hashref or a list of fields and values. If you go the list route, the ordering is preserved β and if you want that same ordering while passing a hashref, go look at Tie::IxHash, it's the plug π«Ά
She returns a list made of:
- the page content as a string π
- the HTTP response code and message (i.e.
"200 OK"or"404 Not Found") - a list of key/value pairs representing the HTTP response headers
The options hashref supports setting headers, like so:
{
headers => { 'X-Header1' => 'value', ... },
}
https_post [ \%options ] SCALAR | HASHREF | FIELD => VALUE, ...
Same energy, but she accepts form fields and values as either a hashref or a list. List mode? ordering preserved. Hashref mode? again, Tie::IxHash is your bestie for that. π
She also accepts, instead of all that, a simple scalar containing the raw content. versatile queen. π
Returns a list consisting of:
- the page content as a string
- the HTTP response code and message (i.e.
"200 OK"or"404 Not Found") - a list of key/value pairs representing the HTTP response headers
The options hashref supports setting headers and Content-Type:
{
headers => { 'X-Header1' => 'value', ... },
Content-Type => 'text/namevalue',
}
π SEE ALSO π
Business::OnlinePaymentNet::HTTPS::Any
okay that's the whole page, you ate that, go build a payment gateway or whatever π β¨
this was Online...:HTTPS(3pm), User Contributed Perl Documentation, from perl v5.36.0, dated 2023-01-22. mwah, ily, go read the source bestie πππ¦
π¦ where this page comes from
- debian bookworm: libbusiness-onlinepayment-perl 3.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libbusiness-onlinepayment-perl 3.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbusiness-onlinepayment-perl 3.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbusiness-onlinepayment-perl 3.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbusiness-onlinepayment-perl 3.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms