承接 teknoo/paypal-exprss 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

teknoo/paypal-exprss

最新稳定版本:4.0.2

Composer 安装命令:

composer require teknoo/paypal-exprss

包简介

Library to perform quickly sales with the service Paypal Express Checkout

README 文档

README

This library allows you to integrate quickly and easily the service "Paypal Express Checkout", using NVP, in your website.

This library is deprecated, please consider the official Paypal PHP SDK.

Quick Example

<?php

declare(strict_types=1);

require_once 'vendor/autoload.php';

use Http\Discovery\HttpClientDiscovery;
use Http\Discovery\Psr17FactoryDiscovery;
use Teknoo\Paypal\Express\Service\ExpressCheckout;
use Teknoo\Paypal\Express\Transport\PsrTransport;

//Initialize Paypal library

//Transport object to communicate with curl
$transport = new PsrTransport(
    HttpClientDiscovery::find(),
    Psr17FactoryDiscovery::findUrlFactory(),
    Psr17FactoryDiscovery::findRequestFactory(),
    Psr17FactoryDiscovery::findStreamFactory(),
    'https://api-3t.sandbox.paypal.com/nvp',
    '93',
    'user id',
    'password',
    'paypal signature',
    'PP-ECWizard'
);

//Paypal service
$service = new ExpressCheckout(
    $transport,
    'https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token={token}'
);

//Prepare demo purchase
$purchase = new class implementing Teknoo\Paypal\Express\Entity\PurchaseInterface {
// ...
};

//In your html, purchase is an custom object implementing the interface PurchaseInterface
<a href="<?php echo $service->prepareTransaction($purchase); ?>">Process to checkout to paypal</a>

//On the result page
$result = $service->getTransactionResult($_GET['token']);
if ($result->isSuccessful()) {
    /* ... */
} else {
    $errors = $result->getErrors();
}

Support this project

This project is free and will remain free. It is fully supported by the activities of the EIRL. If you like it and help me maintain it and evolve it, don't hesitate to support me on Patreon or Github.

Thanks :) Richard.

Credits

EIRL Richard Déloge - https://deloge.io - Lead developer. SASU Teknoo Software - https://teknoo.software

About Teknoo Software

Teknoo Software is a PHP software editor, founded by Richard Déloge, as part of EIRL Richard Déloge. Teknoo Software's goals : Provide to our partners and to the community a set of high quality services or software, sharing knowledge and skills.

License

This library is licensed under the 3-Clause BSD License - see the licenses folder for details.

Installation & Requirements

To install this library with composer, run this command :

composer require teknoo/paypal-exprss

This library requires :

* PHP 8.1+
* A psr/http-message implementation (PSR 7)
* A psr/http-factory implementation (PSR 17)

Example

An example of using this library is available in the folder : Demo.

Contribute :)

You are welcome to contribute to this project. Fork it on Github

统计信息

  • 总下载量: 15.83k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-10-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固