Business::CPI::Role::Receiver - The person receiving the money
version 0.924
# when building a cart my $cart = $cpi->new_cart({ ... receivers => [ { # alias for account.gateway_id gateway_id => 2313, fixed_amount => 50.00, percent_amount => 5.00, pay_gateway_fee => 1, }, { account => $cpi->account_class->new({ ... }), fixed_amount => 250.00, pay_gateway_fee => 0, }, ], });
This role is meant to be included by the class which represents Receivers in the gateway, such as Business::CPI::Base::Receiver. A Receiver is an account in the gateway which is going to receive a percentage or fixed amount of the payment being made.
MANDATORY. A representation of the user account in the gateway. See the Account role for details.
This is not really an attribute, but a shortcut to the gateway_id attribute in the Account. You should provide either a gateway_id or an Account object (for the account attribute) when instantiating a Receiver object, but never both.
Boolean. Is this the main account receiving the money, or secondary? Defaults to false, i.e., it's a secondary receiver.
Boolean attribute to define whether this receiver should be the one paying the gateway fees. Similar to the "feesPayer" parameter in Adaptive Payments in PayPal.
The fee amount this receiver was charged by the gateway.
The value, in the chosen currency, this receiver is getting of the payment.
The percentage of the payment that this receiver is getting.
André Walker <andre@andrewalker.net>
This software is copyright (c) 2015 by André Walker.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Business::CPI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::CPI
CPAN shell
perl -MCPAN -e shell install Business::CPI
For more information on module installation, please visit the detailed CPAN module installation guide.