Package Data | |
---|---|
Maintainer Username: | amsify42 |
Maintainer Contact: | amsify42@gmail.com (Amsify42) |
Package Create Date: | 2016-01-29 |
Package Last Update: | 2018-11-07 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-17 03:00:48 |
Package Statistics | |
---|---|
Total Downloads: | 15,625 |
Monthly Downloads: | 56 |
Daily Downloads: | 0 |
Total Stars: | 2 |
Total Watchers: | 4 |
Total Forks: | 2 |
Total Open Issues: | 1 |
Installation:
composer require amsify42/paypal-masspayment
[OR]
Add the PaypalMassPayment package to your composer.json
file
{
"require": {
"amsify42/paypal-masspayment": "dev-master"
}
}
In your app config, add the PaypalMassPaymentServiceProvider
to the providers array.
'providers' => [
'Amsify42\PaypalMassPayment\PaypalMassPaymentServiceProvider',
];
If you want to make use of the facade, add it to the aliases array in your app config.
'aliases' => [
'PaypalMassPayment' => 'Amsify42\PaypalMassPayment\PaypalMassPaymentFacade',
];
$ php artisan vendor:publish
Now file with name paypalmasspayment.php will be copied in directory Config/ and you can add your settings
use PaypalMassPayment;
$receivers = array(
0 => array(
'ReceiverEmail' => "something@somewhere.com",
'Amount' => "0.01",
'UniqueId' => "id_001",
'Note' => " Test Streammer 1"),
1 => array(
'ReceiverEmail' => "something@somewhere.com",
'Amount' => "0.01",
'UniqueId' => "id_002",
'Note' => " Test Streammer 2"),
);
$response = PaypalMassPayment::executeMassPay('Some Subject', $receivers);
$response = \PaypalMassPayment::executeMassPay('Some Subject', $receivers);
$config = [
'authentication' => 'api_signature',
'environment' => 'sandbox',
'operation_type' => 'nvp',
'api_vesion' => '51.0',
'receiver_type' => 'email',
'currency' => 'USD',
'sandbox' => [
'api_username' => 'random-facilitator_api1.gmail.com',
'api_password' => 'FKJHS786JH3454',
'api_certificate' => '',
'api_signature' => 'sdfrfsf3rds3435432545df3124dg34tDFG#$sG23rfSD3',
],
'live' => [
'api_username' => '',
'api_password' => '',
'api_certificate' => '',
'api_signature' => '',
],
];
$payment = PaypalMassPayment::setConfig($config);
$response = $payment->executeMassPay('Some Subject', $receivers);
$config = [
'environment' => 'live',
'live' => [
'api_username' => '',
'api_password' => '',
'api_certificate' => '',
'api_signature' => '',
],
];
$payment = PaypalMassPayment::setConfig($config);
$response = $payment->executeMassPay('Some Subject', $receivers);