定制 transferwise/wise-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

transferwise/wise-php

Composer 安装命令:

composer require transferwise/wise-php

包简介

Wise PHP Library

README 文档

README

This library is written to accomodate the wise API's use in php projects With Wise you can automate payments, connect your business tools, and create ways to manage your finances. You can also power your cross-border and domestic payouts. For more info have a look at https://wise.com/ and https://api-docs.wise.com/

Requirements

  • PHP 5.6.0 and later.
  • cURL

Install

To install the package use the composer command

composer require transferwise/wise-php

Sample Code

Initialing Client

$client = new \TransferWise\Client(
    [
         "token" => "WISE_TOKEN",
         "profile_id" => "WISE_PROFILE_ID",
         "env" => "sandbox" // optional
    ]
);

Creating a recipient account

$client->recipient_accounts->create(
    [
        "accountHolderName" => "John Snow",
        "currency" => "EUR",
        "type" => "iban",
            "details" => [
                "legalType" => "PRIVATE",
                "IBAN" => "GBFSDFS546S5DF46S5"
        ]
    ]
);

Validating Iban

$client->validators->iban($iban);

Creating Quote

$client->quotes->create(
    [
        "sourceCurrency" => "EUR",
        "targetCurrency" => "GBP",
        "sourceAmount" => "100.00",
        "targetAmount" => null
    ]
);

Creating transfer

$client->transfers->create(
    [
        "targetAccount" => "account id",
        "quoteUuid" => "generated quote id",
        "customerTransactionId" => "transaction id",
        "details" => [
            "reference" => "Company X",
            "transferPurpose"=> "verification.transfers.purpose.pay.bills",
            "sourceOfFunds"=> "verification.source.of.funds.other"
        ]
    ]
);

Resources

Recipient Account

Recipient is a person or institution who is the ultimate beneficiary of your payment.

Available Methods

$client->recipient_accounts->create();
$client->recipient_accounts->all();
$client->recipient_accounts->retrieve();
$client->recipient_accounts->delete();

Quote

The quote resource defines the basic information required for a Wise transfer - the currencies to send between, the amount to send and the profile who is sending the money.

Available Methods

$client->quotes->create();
$client->quotes->temporary();
$client->quotes->update();
$client->quotes->retrieve();

Transfer

A transfer is a payment order to recipient account based on a quote. Once created, a transfer needs to be funded within the next five working days. Otherwise, it will be automatically canceled.

Available Methods

$client->transfers->create();
$client->transfers->requirements();
$client->transfers->fund();
$client->transfers->cancel();
$client->transfers->retrieve();
$client->transfers->issues();
$client->transfers->list();

Validator

Validate different types of bank details with this resource like IBAN, Sort Code, account number etc

Available Methods

$client->validators->sortcode();
$client->validators->accountNo();
$client->validators->iban();
$client->validators->ibanandbic();
$client->validators->aba();
$client->validators->abaAccountNo();
$client->validators->ifsc();
$client->validators->banks();
$client->validators->branch();

Profile

Manage wise user profiles with this resource

Available Methods

$client->profiles->create();
$client->profiles->update();
$client->profiles->all();
$client->profiles->retrieve();
$client->profiles->directors();
$client->profiles->addDirector();
$client->profiles->addIdentificationDocument();
The documentation is a work in progress and will be updated with more details of to use each resource together with a guideline and examples

transferwise/wise-php 适用场景与选型建议

transferwise/wise-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 15.53k 次下载、GitHub Stars 达 23, 最近一次更新时间为 2021 年 12 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 transferwise/wise-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 transferwise/wise-php 我们能提供哪些服务?
定制开发 / 二次开发

基于 transferwise/wise-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 23
  • Watchers: 3
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-12-26