01 Jan 2022 22:16:33 UTC
- Distribution: WebService-PayPal-PaymentsAdvanced
- Module version: 0.000028
- Source (raw)
- Browse (raw)
- How to Contribute
- Repository (git clone)
- Testers (85 / 1 / 6)
- KwaliteeBus factor: 1
- 97.58% Coverage
- License: perl_5
- Perl: v5.16.0
- Activity24 month
- Download (67.21KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionMAXMIND MaxMind, Inc.
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- COPYRIGHT AND LICENSE
WebService::PayPal::PaymentsAdvanced::Mocker::SilentPOST - Easily mock Silent POST transactions
use LWP::UserAgent; use WebService::PayPal::PaymentsAdvanced::Mocker::SilentPOST; my $mocker = WebService::PayPal::PaymentsAdvanced::Mocker::SilentPOST->new(); my $ua = LWP::UserAgent->new(...); $ua->post( '/silent-post-url', $mocker->paypal_success, 'X-Forwarded-For' => '220.127.116.11' );
HashRefof POST params which can be used to mock a successful PayPal authorization.
HashRefof POST params which can be used to mock a successful credit card authorization.
HashRefof POST params which can be used to mock a successful zero dollar credit card authorization.
HashRefof POST params which can be used to mock a unsuccessful credit card payment. In this case you've sent an invoice ID which is already attached to a previously successful transaction.
Use these methods to get a HashRef of params which you can POST to your application's silent POST endpoint. Keep in mind that if you have IP validation enabled you'll either need to spoof the originating IP of the request or disable the IP validation in test mode. I'd encourage you to do the former, if at all possible.
Bugs may be submitted through https://github.com/maxmind/webservice-paypal-paymentsadvanced/issues.
Olaf Alders <firstname.lastname@example.org>
This software is copyright (c) 2022 by MaxMind, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install WebService::PayPal::PaymentsAdvanced, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install WebService::PayPal::PaymentsAdvanced
For more information on module installation, please visit the detailed CPAN module installation guide.