Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 65 | All time: 10,389 This week: 524 |
Version | License | PHP version | Categories | |||
standard-paypal-php- 1.0.0 | MIT/X Consortium ... | 5 | PHP 5, E-Commerce, Web services |
Description | Author | ||||||||
This package can compose orders and process payments using Paypal. |
|
_This library provides developers with a simple set of bindings to help you integrate PayPal Standard to a website and start receiving payments._
php >= 8.1
guzzlehttp/guzzle >= 7.0.1
echosistema/simple-http-request" >= 1.0.1
? Coming soon package to PHP versions < 8.1
.
First time using PayPal? Create your PayPal account in PayPal, if you don?t have one already.
Download Composer if not already installed
On your project directory run on the command line "composer require ewertondaniel/paypal-standard-php-sdk"
for PHP 8.1
;
That's it! PayPal Standard PHP SDK has been successfully installed!
use EwertonDaniel\PayPal\Auth;
$authentication = new Auth($client_id, $client_secret, $is_production);
$authentication->getScopes();
$authentication->getAccessToken();
$authentication->getTokenType();
$authentication->getAppId();
$authentication->getExpiresIn();
$authentication->getNonce();
use EwertonDaniel\PayPal\Order;
$order = new Order($authentication);
//Set Purchase Unit
$order->setPaypalRequestId()
->setIntent('CAPTURE')
->purchaseUnit()
->setCurrencyCode('BRL')
->addItemWithBasicData('Blacksaber Mandalore', 1, 29900) // string $name, int $quantity, int $value
->setReferenceId()
->setDescription('I can write up to one hundred and twenty seven characters as a description...');
// Set Payment Source
$order->pushPurchaseUnit()
->paymentSource()
->paypal()
->experienceContext()
->setPaymentMethodPreference('IMMEDIATE_PAYMENT_REQUIRED')
->setBrandName('Bounty Hunters Guild (BHG)') // Company name
->setLocale('pt-BR')
->setLandingPage('LOGIN')
->setShippingPreference('NO_SHIPPING')
->setUserAction('PAY_NOW')
->setReturnUrl('https://example.com/returnUrl')
->setNotificationUrl('https://example.com/notifyUrl')
->setCancelUrl('https://example.com/cancelUrl');
$response = $order->create();
use EwertonDaniel\PayPal\Order;
$order_id = $_POST['token'];
$detail = $order->setOrderId($order_id)->detail();
Files (46) |
File | Role | Description | ||
---|---|---|---|---|
src (1 directory) | ||||
autoload.php | Aux. | Auxiliary script | ||
composer.json | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Files (46) | / | src | / | PayPal |
File | Role | Description | ||
---|---|---|---|---|
Configuration (2 files) | ||||
Exceptions (8 files) | ||||
PaymentSource (2 files, 1 directory) | ||||
PurchaseUnit (3 files, 1 directory) | ||||
Rules (3 files) | ||||
Tests (4 files) | ||||
Traits (1 file, 3 directories) | ||||
Address.php | Class | Class source | ||
Auth.php | Class | Class source | ||
Order.php | Class | Class source | ||
PaymentSource.php | Class | Class source | ||
PhoneNumber.php | Class | Class source | ||
PurchaseUnit.php | Class | Class source | ||
Shipping.php | Class | Class source | ||
TaxInfo.php | Class | Class source |
Files (46) | / | src | / | PayPal | / | Configuration |
File | Role | Description |
---|---|---|
configuration.json | Data | Auxiliary data |
Configuration.php | Class | Class source |
Files (46) | / | src | / | PayPal | / | Exceptions |
File | Role | Description |
---|---|---|
BrCnpjValidationException.php | Class | Class source |
BrCpfValidationException.php | Class | Class source |
EmailValidationException.php | Class | Class source |
ExceptionInterface.php | Class | Class source |
OrderException.php | Class | Class source |
PayPalAuthenticationException.php | Class | Class source |
PaypalStandardSdkException.php | Class | Class source |
ValidationException.php | Class | Class source |
Files (46) | / | src | / | PayPal | / | PaymentSource |
File | Role | Description | ||
---|---|---|---|---|
ExperienceContext (4 files) | ||||
ExperienceContext.php | Class | Class source | ||
PaypalPaymentSource.php | Class | Class source |
Files (46) | / | src | / | PayPal | / | PaymentSource | / | ExperienceContext |
File | Role | Description |
---|---|---|
LandingPage.php | Class | Class source |
PaymentMethodPreference.php | Class | Class source |
ShippingPreference.php | Class | Class source |
UserAction.php | Class | Class source |
Files (46) | / | src | / | PayPal | / | PurchaseUnit |
File | Role | Description | ||
---|---|---|---|---|
Item (2 files) | ||||
Item.php | Class | Class source | ||
Payee.php | Class | Class source | ||
UnitAmount.php | Class | Class source |
Files (46) | / | src | / | PayPal | / | PurchaseUnit | / | Item |
File | Role | Description |
---|---|---|
Category.php | Class | Class source |
Quantity.php | Class | Class source |
Files (46) | / | src | / | PayPal | / | Rules |
File | Role | Description |
---|---|---|
BrCnpjRule.php | Class | Class source |
BrCpfRule.php | Class | Class source |
EmailRule.php | Class | Class source |
Files (46) | / | src | / | PayPal | / | Tests |
File | Role | Description |
---|---|---|
AuthTest.php | Class | Class source |
ConfigurationTest.php | Class | Class source |
OrderTest.php | Class | Class source |
PurchaseUnitTest.php | Class | Class source |
Files (46) | / | src | / | PayPal | / | Traits |
File | Role | Description | ||
---|---|---|---|---|
Auth (2 files) | ||||
Order (2 files) | ||||
PaymentSource (2 files) | ||||
DisplayColor.php | Class | Class source |
Files (46) | / | src | / | PayPal | / | Traits | / | Auth |
File | Role | Description |
---|---|---|
AuthGetters.php | Class | Class source |
AuthSetters.php | Class | Class source |
Files (46) | / | src | / | PayPal | / | Traits | / | Order |
File | Role | Description |
---|---|---|
OrderGetters.php | Class | Class source |
OrderSetters.php | Class | Class source |
Files (46) | / | src | / | PayPal | / | Traits | / | PaymentSource |
File | Role | Description |
---|---|---|
PayPalPaymentSourceGetters.php | Class | Class source |
PayPalPaymentSourceSetters.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
standard-paypal-php--2023-01-17.zip 35KB | |
standard-paypal-php--2023-01-17.tar.gz 19KB | |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.