ankio/vpay-sdk

dev-master 2023-08-06 11:49 UTC

This package is auto-updated.

Last update: 2024-10-18 06:41:46 UTC


README

Vpay接入SDK

引入SDK

作为子模块使用

git add submodule https://github.com/Vpay-Colloction/vpay-sdk
git  submodule init
git  submodule update --remote

通过Composer调用

composer require ankio/vpay-sdk
  • 创建订单
$order = new \Ankio\objects\PayCreateObject();
$order->app_item = "商品名称";
$order->appid = $config->id;
$order->param = json_encode(array_merge(arg(),["item"=>$item->toArray()]));
$order->price = $item->item_price;
$order->pay_type =$pay_type;
$order->notify_url = url("api_shop","main","notify");
$order->return_url = url("shop","main","return");
$crateObject->
(new \Ankio\Vpay(new \Ankio\PayConfig($config)))->create();
  • 关闭订单
  • 查询订单状态