tenstone / laravel-shop
该包设置为提供商店或电子商务功能(如购物车、订单、交易和商品)以供Laravel自定义构建。
Requires
- php: >=5.5.9
- amsgames/laravel-shop-gateway-paypal: 1.0.*
- illuminate/console: ~5.0
- illuminate/support: ~5.0
This package is not auto-updated.
Last update: 2024-09-18 19:25:07 UTC
README
Laravel Shop是以灵活的方式将商店功能添加到Laravel 5.1中。旨在成为工匠的电子商务解决方案。
Laravel商店为您的现有或新项目添加购物车、订单和支付功能;让您将任何模型转换为可购买的商品。
支持
内容
范围
当前版本包括
- 商店商品(将现有模型转换为可添加到购物车和订单的可购买商品)
- 购物车
- 订单
- 交易
- 支付网关支持
- PayPal
- 事件
即将推出
- 访客用户购物车
- 发货订单
- 优惠券
- 产品及其变体解决方案
- 后端仪表板
- 前端模板
安装
使用composer
composer require amsgames/laravel-shop
或添加
"amsgames/laravel-shop": "0.2.*"
到您的composer.json中。然后运行composer install或composer update。
然后在您的config/app.php中添加
Amsgames\LaravelShop\LaravelShopProvider::class,
在providers数组中。
然后添加
'Shop' => Amsgames\LaravelShop\LaravelShopFacade::class,
在aliases数组中。
配置
在config/auth.php文件中设置配置值。此包将使用它们来引用用户表和模型。
发布此包的配置以进一步自定义表名、模型命名空间、货币和其他值。运行以下命令
php artisan vendor:publish
将在您的app/config目录中创建一个shop.php文件。
数据库设置
生成包迁移文件
php artisan laravel-shop:migration
以下命令将生成一个包含创建购物车和商品表数据库命令的新迁移文件。该文件将位于database/migrations。如有必要,添加其他字段以满足您的软件需求。
该命令还会创建一个数据库填充器以填充商店目录的状态和类型。
在数据库中创建模式
php artisan migrate
将填充器添加到database/seeds/DatabaseSeeder.php
class DatabaseSeeder extends Seeder { public function run() { Model::unguard(); $this->call('LaravelShopSeeder'); Model::reguard(); } }
运行填充器(先运行composer dump-autoload)
php artisan db:seed
模型
以下模型必须创建才能使商店功能正常,这些模型可以根据您的需求进行自定义。
商品
创建一个商品模型
php artisan make:model Item
这将创建一个模型文件app/Item.php,编辑它并使其看起来像(考虑您的应用程序命名空间)
<?php namespace App; use Amsgames\LaravelShop\Models\ShopItemModel; class Item extends ShopItemModel { }
Item模型具有以下主要属性
id— 商品ID。sku— 库存保持单位,即您在商店中独特的商品标识。price— 商品价格。tax— 商品税。默认为0。shipping— 商品运输。默认为0。currency— 当前版本的应用程序将使用USD作为默认货币。quantity— 商品数量。class— 被用作可购买商品的模型的类引用。当使用数组数据时为可选。reference_id— 使用作为可购买项目的模型的ID引用。使用数组数据时为可选。user_id— 拥有者。displayPrice— 适合商店展示的价格值格式。例如,“$9.99”而不是仅仅“9.99”。displayTax— 适合商店展示的税值格式。例如,“$9.99”而不是仅仅“9.99”。displayShipping— 适合商店展示的运费值格式。例如,“$9.99”而不是仅仅“9.99”。displayName— 基于模型的商品名称属性。shopUrl— 基于模型的商品路由属性。wasPurchased— 标志表示商品是否已被购买。这基于配置文件中设置的状态。created_at— 商品记录在数据库中创建的时间。updated_at— 商品最后一次更新的时间。
业务定义:用作购物车项目或订单项目的商品。
购物车
创建购物车模型
php artisan make:model Cart
这将创建模型文件app/Cart.php,编辑它并使其看起来像(考虑您的应用程序命名空间)
<?php namespace App; use Amsgames\LaravelShop\Models\ShopCartModel; class Cart extends ShopCartModel { }
Item模型具有以下主要属性
id— 购物车ID。user_id— 拥有者。items— 购物车中的商品。count— 购物车中商品的总数量。totalPrice— 购物车中所有商品的总价格。totalTax— 购物车中所有商品的总税额,加上配置中设置的全球税。totalShipping— 购物车中所有商品的运费总额。total— 应收取的总金额,总和总价格、总税额和总运费。displayTotalPrice— 适合商店展示的总价格值格式。例如,“$9.99”而不是仅仅“9.99”。displayTotalTax— 适合商店展示的总税值格式。例如,“$9.99”而不是仅仅“9.99”。displayTotalShipping— 适合商店展示的总运费值格式。例如,“$9.99”而不是仅仅“9.99”。displayTotal— 适合商店展示的总金额值格式。例如,“$9.99”而不是仅仅“9.99”。created_at— 购物车记录在数据库中创建的时间。updated_at— 购物车最后一次更新的时间。
订单
创建订单模型
php artisan make:model Order
这将创建模型文件app/Order.php,编辑它并使其看起来像(考虑您的应用程序命名空间)
<?php namespace App; use Amsgames\LaravelShop\Models\ShopOrderModel; class Order extends ShopOrderModel { }
订单模型有以下主要属性
id— 订单ID或订单编号。user_id— 拥有者。items— 订单中的商品。transactions— 对订单执行的交易。statusCode— 状态代码。count— 订单中商品的总数量。totalPrice— 订单中所有商品的总价格。totalTax— 订单中所有商品的总税额,加上配置中设置的全球税。totalShipping— 订单中所有商品的运费总额。total— 应收取的总金额,总和总价格、总税额和总运费。displayTotalPrice— 适合商店展示的总价格值格式。例如,“$9.99”而不是仅仅“9.99”。displayTotalTax— 适合商店展示的总税值格式。例如,“$9.99”而不是仅仅“9.99”。displayTotalShipping— 适合商店展示的总运费值格式。例如,“$9.99”而不是仅仅“9.99”。displayTotal— 适合商店展示的总金额值格式。例如,“$9.99”而不是仅仅“9.99”。created_at— 订单记录在数据库中创建的时间。updated_at— 订单最后一次更新的时间。
交易
创建交易模型
php artisan make:model Transaction
这将创建模型文件app/Transaction.php,编辑它并使其看起来像(考虑您的应用程序命名空间)
<?php namespace App; use Amsgames\LaravelShop\Models\ShopTransactionModel; class Transaction extends ShopTransactionModel { }
订单模型有以下主要属性
id— 订单ID或订单编号。order— 订单中的商品。gateway— 使用的网关。transaction_id— 网关返回的交易ID。detail— 网关返回的详细信息。token— 网关回调的令牌。created_at— 订单记录在数据库中创建的时间。updated_at— 订单最后一次更新的时间。
用户
在您的现有User模型中使用ShopUserTrait特性。通过添加use Amsgames\LaravelShop\Traits\ShopUserTrait和use ShopUserTrait,如下例所示
<?php use Amsgames\LaravelShop\Traits\ShopUserTrait; class User extends Model { use Authenticatable, CanResetPassword, ShopUserTrait; }
这将启用与Cart的关系以及所需的商店方法和属性。
cart— 用户的购物车。items— 商品(订单或购物车中的商品)。orders— 用户的订单。
现有模型转换
Laravel Shop 包允许您将任何现有的 Eloquent 模型转换为可购买的商品,您可以在商店中使用它而不会牺牲任何现有功能。此功能将允许将模型添加到购物车或订单中。这需要两个小步骤
在您的现有模型中使用 ShopItemTrait。通过添加 use Amsgames\LaravelShop\Traits\ShopItemTrait 和 use ShopItemTrait,如下例所示
<?php use Amsgames\LaravelShop\Traits\ShopItemTrait; class MyCustomProduct extends Model { use ShopItemTrait; // MY METHODS AND MODEL DEFINITIONS........ }
将 sku(字符串)和 price(小数,20,2)字段添加到您的模型表中。您还可以包括 name(字符串)、tax(小数,20,2)和 shipping(小数,20,2),尽管这些是可选的。您可以通过创建一个新的迁移来完成此操作
php artisan make:migration alter_my_table
定义迁移如下所示
<?php class AlterMyTable extends Migration { public function up() { Schema::table('MyCustomProduct', function($table) { $table->string('sku')->after('id'); $table->decimal('price', 20, 2)->after('sku'); $table->index('sku'); $table->index('price'); }); } public function down() { // Restore type field Schema::table('MyCustomProduct', function($table) { $table->dropColumn('sku'); $table->dropColumn('price'); }); } }
运行迁移
php artisan migrate
商品名称
默认情况下,Laravel Shop 将查找 name 属性以定义商品的名称。如果您的现有模型已分配了不同的属性用于名称,只需在模型内的属性中定义它即可
<?php use Amsgames\LaravelShop\Traits\ShopItemTrait; class MyCustomProduct extends Model { use ShopItemTrait; /** * Custom field name to define the item's name. * @var string */ protected $itemName = 'product_name'; // MY METHODS AND MODEL DEFINITIONS........ }
商品 URL
您可以通过设置类属性 itemRouteName 和 itemRouteParams 来定义商品的 URL 属性。在以下示例中,定义的 URL 用于显示产品的配置文件是 product/{slug},必须在模型中应用以下更改
<?php use Amsgames\LaravelShop\Traits\ShopItemTrait; class MyCustomProduct extends Model { use ShopItemTrait; /** * Name of the route to generate the item url. * * @var string */ protected $itemRouteName = 'product'; /** * Name of the attributes to be included in the route params. * * @var string */ protected $itemRouteParams = ['slug']; // MY METHODS AND MODEL DEFINITIONS........ }
自动加载导出
输出 composer 自动加载
composer dump-autoload
支付网关
可以在 shop.php 配置文件中的 gateways 数组中配置和添加已安装的支付网关,如下所示
'gateways' => [ 'paypal' => Amsgames\LaravelShopGatewayPaypal\GatewayPayPal::class, 'paypalExpress' => Amsgames\LaravelShopGatewayPaypal\GatewayPayPalExpress::class, ],
PayPal
Laravel Shop 默认支持 PayPal。您可以使用 PayPal 的 直接借记卡 或 PayPal 快速支付 支付方式。
有关配置 PayPal 以及如何使用网关的详细信息,请访问 PayPal 网关包页面。
Omnipay
安装 Omnipay 网关 以启用其他支付服务,如 2Checkout、Authorize.net、Stripe 等。
您可能需要了解 Omnipay 的工作原理。
用法
商店
需要考虑的商店方法
将价格或其他值格式化为配置中指定的价格格式
$formatted = Shop::format(9.99); // i.e. this will return $9.99 or the format set in the config file.
购买流程
使用 Laravel Shop,您可以自定义以适应您的需求,尽管我们建议标准化您的购买或结账流程如下(下面将解释如何使用商店方法)
- (步骤 1)- 用户查看他的购物车。
- (步骤 2)- 继续选择要使用的网关。
- (步骤 3)- 继续向所选网关提供所需信息。
- (步骤 4)- 在下订单前检查结账购物车并审查购物车。
- (步骤 5)- 下订单。
支付网关
在调用任何商店方法之前,必须设置支付网关
// Select the gateway to use Shop::setGateway('paypal'); echo Shop::getGateway(); // echos: paypal
您还可以访问网关类对象
$gateway = Shop::gateway(); echo $gateway; // echos: [{"id":"paypal"}]
结账
一旦选择了一个支付网关,您就可以像这样调用购物车结账
// Checkout current users' cart $success = Shop::checkout(); // Checkout q specific cart $success = Shop::checkout($cart);
这将调用支付网关中的 onCheckout 函数并执行验证。此方法将返回一个布尔标志,表示操作是否成功。
订单放置
一旦选择了支付网关并且用户已经结账,您可以调用订单放置如下所示
// Places order based on current users' cart $order = Shop::placeOrder(); // Places order based on a specific cart $order = Shop::placeOrder($cart);
注意: placeOrder() 将创建一个订单,将购物车中的所有项目与订单相关联,并清空购物车。Order 模型不包括添加或删除项的方法,任何对购物车的修改必须在下订单之前完成。在设计您的结账流程时请注意这一点。
这将调用支付网关中的 onCharge 函数并使用订单总金额向用户收费。 placeOrder() 将返回一个 Order 模型,您可以使用它来验证状态并检索网关生成的交易。
支付
支付由网关处理,此包默认支持 PayPal。
您可以使用 PayPal 的 直接借记卡 或 PayPal 快速支付 支付方式。
要配置 PayPal 并了解如何使用其网关,请访问 PayPal 网关包 页面。
异常
如果结账或下单出现错误,可以调用并查看相关异常。
// On checkout if (!Shop::checkout()) { $exception = Shop::exception(); echo $exception->getMessage(); // echos: error } // Placing order $order = Shop::placeOrder(); if ($order->hasFailed) { $exception = Shop::exception(); echo $exception->getMessage(); // echos: error }
关键异常存储在 Laravel 的日志中。
购物车
购物车在数据库中按用户创建,这意味着用户可以在登出时和切换到不同设备时保存其购物车。
让我们先调用或创建当前用户的购物车。
// From cart $cart = Cart::current(); // Once a cart has been created, it can be accessed from user $user->cart;
注意:Laravel Shop 目前不支持访客。
获取其他用户的购物车。
$userId = 1; $cart = Cart::findByUser($userId);
添加商品
让我们添加一个测试和现有模型 MyCustomProduct 的一个项目。
$cart = Cart::current()->add(MyCustomProduct::find(1));
默认情况下,添加方法将设置数量为 1。
相反,让我们添加 3 个 MyCustomProduct。
$cart = Cart::current(); $cart->add(MyCustomProduct::find(1), 3);
购物车中每个 sku 只会创建一个项目。如果添加了相同 sku 的项目,则只会保留一个项目,但其数量会增加。
$product = MyCustomProduct::find(1); // Adds 1 $cart->add($product); // Adds 3 $cart->add($product, 3); // Adds 2 $cart->add($product, 2); echo $cart->count; // echos: 6 $second_product = MyCustomProduct::findBySKU('TEST'); // Adds 2 of product 'TEST' $cart->add($second_product, 2); // Count based on quantity echo $cart->count; // echos: 8 // Count based on products echo $cart->items->count(); // echos: 2
我们可以将项目的数量重置为给定的值。
// Add 3 $cart->add($product, 3); echo $cart->count; // echos: 3 // Reset quantity to 4 $cart->add($product, 4, $forceReset = true); echo $cart->count; // echos: 4
添加不存在的模型项目
您可以通过将它们作为数组插入来添加不存在的项目,每个数组必须包含 sku 和 price 键。
// Adds unexistent item model PROD0001 $cart->add(['sku' => 'PROD0001', 'price' => 9.99]); // Add 4 items of SKU PROD0002 $cart->add(['sku' => 'PROD0002', 'price' => 29.99], 4);
移除商品
让我们从购物车中移除测试和现有模型 MyCustomProduct。
$product = MyCustomProduct::find(1); // Remove the product from cart $cart = Cart::current()->remove($product);
下面的示例将完全移除项目,但也可以只从购物车中移除一定数量的项目。
// Removes only 2 from quantity // If the quantity is greater than 2, then 1 item will remain in cart $cart->remove($product, 2);
可以使用数组来移除不存在的模型项目。
// Removes by sku $cart->remove(['sku' => 'PROD0001']);
清空购物车
$cart->clear();
这些方法可以链式调用。
$cart->add($product, 5) ->add($product2) ->remove($product3) ->clear();
购物车方法
// Checks if cart has item with SKU "PROD0001" $success = $cart->hasItem('PROD0001');
下单
您可以直接从购物车下单,而无需调用 Shop 类,尽管这只会创建数据库中的订单记录,并不会处理支付。与使用 Shop 类时相同,订单完成后购物车将清空。
// This will create the order and set it to the status in configuration $order = $cart->placeOrder();
创建时也可以强制设置状态。
$order = $cart->placeOrder('completed');
显示
以下是如何在 blade 模板中显示购物车的示例。
购物车中的项目数量
<span>Items in cart: {{ $cart->count }}</span>
购物车中的项目
<table> @foreach ($cart->items as $item) { <tr> <td>{{ $item->sku }}</td> <td><a href="{{ $item->shopUrl }}">{{ $item->displayName }}</a></td> <td>{{ $item->price }}</td> <td>{{ $item->displayPrice }}</td> <td>{{ $item->tax }}</td> <td>{{ $item->quantity }}</td> <td>{{ $item->shipping }}</td> </tr> @endforeach </table>
购物车金额计算
<table> <tbody> <tr> <td>Subtotal:</td> <td>{{ $cart->displayTotalPrice }}</td> <td>{{ $cart->totalPrice }}</td> </tr> <tr> <td>Shipping:</td> <td>{{ $cart->displayTotalShipping }}</td> </tr> <tr> <td>Tax:</td> <td>{{ $cart->displayTotalTax }}</td> </tr> </tbody> <tfoot> <tr> <th>Total:</th> <th>{{ $cart->displayTotal }}</th> <th>{{ $cart->total }}</th> </tr> </tfoot> </table>
商品
插入到购物车或订单中的模型或数组将转换为购物车项目,商店中使用模型 Item。
可以从购物车项目检索模型对象。
// Lets assume that the first Cart item is MyCustomProduct. $item = $cart->items[0]; // Check if item has model if ($item->hasObject) { $myproduct = $item->object; }
$item->object 是已经加载的 MyCustomProduct 模型,我们可以直接访问其属性和方法,例如
// Assuming MyCustomProduct has a types relationship. $item->object->types; // Assuming MyCustomProduct has myAttribute attribute. $item->object->myAttribute;
以下商店方法适用于模型 Item 或使用 ShopItemTrait 的现有模型
$item = Item::findBySKU('PROD0001'); $item = MyCustomProduct::findBySKU('PROD0002'); // Quering $item = Item::whereSKU('PROD0001')->where('price', '>', 0)->get();
订单
查找特定订单号
$order = Order::find(1);
查找用户的订单
// Get orders from specific user ID. $orders = Order::findByUser($userId); // Get orders from specific user ID and status. $canceled_orders = Order::findByUser($userId, 'canceled');
放置交易
您可以直接从订单下单,而无需调用 Shop 类,尽管这只会创建数据库中的交易记录,并不会处理支付。
// This will create the order and set it to the status in configuration $transaction = $order->placeTransaction( $gateway = 'my_gateway', $transactionId = 55555, $detail = 'Custom transaction 55555' );
订单方法
$completed = $order->isCompleted // Checks if order is in a specific status. $success = $order->is('completed'); // Quering // Get orders from specific user ID. $orders = Order::whereUser($userId)->get(); // Get orders from specific user ID and status. $completed_orders = Order::whereUser($userId) ->whereStatus('completed') ->get();
订单状态码
开箱即用的状态码
in_creation— 订单正在创建的状态。或使用$order->isInCreation。pending— 待支付。或使用$order->isPending。in_process— 正在发货。正在修订中。或使用$order->isInProcess。completed— 当支付已完成且项目已交付给客户时。或使用$order->isCompleted。failed— 当支付失败时。或使用$order->hasFailed。canceled— 当用户取消订单时。或使用$order->isCanceled。
您可以使用自己的自定义状态码。只需手动将其添加到 order_status 数据库表或创建一个自定义种子,如下所示
class MyCustomStatusSeeder extends Seeder { public function run() { DB::table('order_status')->insert([ [ 'code' => 'my_status', 'name' => 'My Status', 'description' => 'Custom status used in my shop.', ], ]); } }
然后使用它
$myStatusCode = 'my_status'; if ($order->is($myStatusCode)) { echo 'My custom status work!'; }
事件
Laravel Shop 遵循 Laravel 5 指南 来触发事件,创建您的处理程序和监听器,就像您通常使用它们一样。
以下是事件的参考
事件处理程序示例
如何在处理程序中使用事件的示例
<?php namespace App\Handlers\Events; use App\Order; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Amsgames\LaravelShop\Events\OrderCompleted; class NotifyPurchase implements ShouldQueue { use InteractsWithQueue; /** * Handle the event. * * @param OrderPurchased $event * @return void */ public function handle(OrderCompleted $event) { // The order ID echo $event->id; // Get order model object $order = Order::find($event->id); // My code here... } }
请记住在事件提供程序中注册您的处理程序和监听器
'Amsgames\LaravelShop\Events\OrderCompleted' => [ 'App\Handlers\Events\NotifyPurchase', ],
支付网关开发
为定制而开发的 Laravel Shop 允许社区扩展其功能。
缺失的支付网关可以轻松地作为外部包开发,然后配置在配置文件中。
将此项目作为您的包或 Laravel 设置的必需依赖项,并简单地扩展 Laravel Shop 核心类,以下是一个 PayPal 示例
<?php namespace Vendor\Package; use Amsgames\LaravelShop\Core\PaymentGateway; use Amsgames\LaravelShop\Exceptions\CheckoutException; use Amsgames\LaravelShop\Exceptions\GatewayException; class GatewayPayPal extends PaymentGateway { /** * Called on cart checkout. * THIS METHOD IS OPTIONAL, DONE FOR GATEWAY VALIDATIONS BEFORE PLACING AN ORDER * * @param Order $order Order. */ public function onCheckout($cart) { throw new CheckoutException('Checkout failed.'); } /** * Called by shop to charge order's amount. * * @param Order $order Order. * * @return bool */ public function onCharge($order) { throw new GatewayException('Payment failed.'); return false; } }
网关至少需要 onCharge 方法。根据您的需求可以添加更多。
一旦创建,您可以将它添加到 shop.php 配置文件中,如下所示
'gateways' => [ 'paypal' => Vendor\Package\GatewayPaypal::class, ],
使用方法如下
Shop::setGateway('paypal');
交易
要正确生成交易,您必须在 onCharge 设置时考虑以下 3 个属性
public function onCharge($order) { // The transaction id generated by the provider i.e. $this->transactionId = $paypal->transactionId; // Custom detail of 1024 chars. $this->detail = 'Paypal: success'; // Order status after method call. $this->statusCode = 'in_process'; return true; }
transactionId—— 提供商的交易 ID,有助于识别交易。detail—— 交易的定制描述。statusCode—— 在onCharge执行后更新的订单状态代码。默认为 'completed'。
回调
Laravel Shop 支持需要回调的网关。为此,您需要为您的网关添加 2 个附加函数
<?php namespace Vendor\Package; use Amsgames\LaravelShop\Core\PaymentGateway; use Amsgames\LaravelShop\Exceptions\CheckoutException; use Amsgames\LaravelShop\Exceptions\GatewayException; class GatewayWithCallbacks extends PaymentGateway { /** * Called by shop to charge order's amount. * * @param Order $order Order. * * @return bool */ public function onCharge($order) { // Set the order to pending. $this->statusCode = 'pending'; // Sets provider with the callback for successful transactions. $provider->setSuccessCallback( $this->callbackSuccess ); // Sets provider with the callback for failed transactions. $provider->setFailCallback( $this->callbackFail ); return true; } /** * Called on callback. * * @param Order $order Order. * @param mixed $data Request input from callback. * * @return bool */ public function onCallbackSuccess($order, $data = null) { $this->statusCode = 'completed'; $this->detail = 'successful callback'; $this->transactionId = $data->transactionId; // My code... } /** * Called on callback. * * @param Order $order Order. * @param mixed $data Request input from callback. * * @return bool */ public function onCallbackFail($order, $data = null) { $this->detail = 'failed callback'; // My code... } }
在上面的示例中,onCharge 不是创建完成的交易,而是创建一个挂起的交易,并指示提供商哪些 URL 需要调用以获取支付结果。
onCallbackSuccess 和 onCallbackFail 方法是由 Shop 在提供商调用回其响应时调用的,具体调用的函数取决于提供商使用的回调 URL。
onCallbackSuccess 方法将为结束的订单创建一个新的交易。
callbackSuccess—— 成功的 URL 回调,由提供商使用。callbackFail—— 例如,失败的 URL 回调由提供商使用。token—— 例如,验证令牌。
异常
Laravel Shop 提供了几个异常,您可以用来报告错误。
对于 onCheckout
CheckoutExceptionGatewayExceptionStoreException—— 此异常将在 Laravel 中记录,因此仅用于致命错误。
对于 onChange、onCallbackSuccess 和 onCallbackFail
GatewayExceptionStoreException—— 此异常将在 Laravel 中记录,因此仅用于致命错误。
注意:Laravel Shop 不会捕获任何其他异常。如果抛出一个正常的 Exception 或其他异常,它将像通常那样中断方法,这会影响您的结账流程,例如在示例中,当您想要从 placeOrder() 获取订单时。
示例
您可以看到我们制作的 PayPal 网关 作为示例。
-
GatewayPayPal - 处理信用卡,使用
onCheckout和onCharge。 -
GatewayPayPalExpress - 处理回调,使用
onCallbackSuccess和onCharge。
许可
Laravel Shop 是免费软件,根据 MIT 许可证的条款分发。
其他信息
此包的架构和设计受到了 Zizaco/entrust 包的启发,我们感谢他们的贡献者们的出色工作。