Business-cXML

 view release on metacpan or  search on metacpan

lib/Business/cXML/Transmission.pm  view on Meta::CPAN


Its node name is automatically determined in L</toString()>, but you are free
to add/change other attributes and child elements.  Returns C<undef> for
incoming (parsed) transmissions.

Accessing this property causes the destruction of L</payload> if it existed.
This is in place so that your own parsing of LibXML structures takes
precedence over ours to hopefully make future updates seamless in the event of
conflicts.  Thus, while you can modify the native payload, then modify the XML
version, B<switching back again to native would lose all data>.

=cut

sub xml_payload {
	my ($self) = @_;
	$self->{_payload} = undef;
	return $self->{_xml_payload};
}

=item C<B<status>( [ I<$code>, [$description] ] )>

Get/set transmission's cXML 3-digit status code.  (None by default.)

I<C<$description>> is an optional explanatory text that may be included in the
status of a response.

cXML defines the following status codes, which are the only ones accepted.

B<Success:>

=over

=item C<200> OK

Request executed and delivered, cXML itself has no error

=item C<201> Accepted

Not yet processed, we'll send a StatusUpdate later

=item C<204> No Content

Request won't get a Response from server (i.e. punch-out cart didn't change)

=item C<280> [Described like 201]

=item C<281> [Described like 201]

=back

B<Permanent errors:>

=over

=item C<400> Bad Request

Parsed OK but unacceptable

=item C<401> Unauthorized

Request/Sender credentials not recognized

=item C<402> Payment Required

Need complete Payment element

=item C<403> Forbidden

Insufficient privileges

=item C<406> Not Acceptable

Request unacceptable, likely parsing failure

=item C<409> Conflict

Current state incompatible with Request

=item C<412> Precondition Failed

Unlike 403, the precondition was described in a previous response

=item C<417> Expectation Failed

Request implied a resource condition that was not met, such as an unknown one

=item C<450> Not Implemented

Server doesn't implement that Request (so client ignored server's profile?)

=item C<475> Signature Required

Document missing required digital signature

=item C<476> Signature Verification Failed

Failed signature or unsupported signature algorithm

=item C<477> Signature Unacceptable

Valid signature but otherwise rejected

=back

B<Transient errors:>

=over

=item C<500> Internal Server Error

Server was unable to complete the Request (temporary)

=item C<550> Unable to reach cXML server

Applies to intermediate hubs (temporary)

=item C<551> Unable to forward request

Because of supplier misconfiguration (temporary)

=item C<560> Temporary server error



( run in 2.377 seconds using v1.01-cache-2.11-cpan-0d23b851a93 )