All Projects → bitmash → Alipay Api Php

bitmash / Alipay Api Php

Licence: gpl-2.0
A concise library in PHP for the Alipay API merchant account.

Projects that are alternatives of or similar to Alipay Api Php

Laravel Pay
可能是我用过的最优雅的 Alipay 和 WeChat 的 laravel 支付扩展包了
Stars: ✭ 856 (+1721.28%)
Mutual labels:  payment, alipay
java-pay
微信支付宝App、小程序、扫码支付、退款、提现案例
Stars: ✭ 40 (-14.89%)
Mutual labels:  payment, alipay
CGYPay
统一支付接口(仅供参考)
Stars: ✭ 13 (-72.34%)
Mutual labels:  payment, alipay
Payment
Payment是php版本的支付聚合第三方sdk,集成了微信支付、支付宝支付、招商一网通支付。提供统一的调用接口,方便快速接入各种支付、查询、退款、转账能力。服务端接入支付功能,方便、快捷。
Stars: ✭ 2,293 (+4778.72%)
Mutual labels:  payment, alipay
Pay
可能是我用过的最优雅的 Alipay 和 WeChat 的支付 SDK 扩展包了
Stars: ✭ 4,176 (+8785.11%)
Mutual labels:  payment, alipay
Omnipay Pingpp
A Ping++ driver for the Omnipay PHP payment processing library. 一个聚合了支付宝(APP、Wap、PC、即时到账、扫码、企业付款),微信(APP、公众号、红包), 银联网关、银联企业网银、Apple Pay、QQ 钱包、易宝支付、百度钱包、京东支付、京东白条、招行一网通、分期支付等国内主流支付渠道的聚合支付网关(Ping++, also known as Pingpp/Pingxx/Pingplusplus)
Stars: ✭ 227 (+382.98%)
Mutual labels:  payment, alipay
QSPay
😀安卓一行代码☕搞定微信支付、支付宝支付、银联支付
Stars: ✭ 28 (-40.43%)
Mutual labels:  payment, alipay
Payment
支付宝支付、银联支付、微信支付、paypal、苹果内购支付
Stars: ✭ 48 (+2.13%)
Mutual labels:  payment, alipay
Gopay
golang支付:微信公众号,微信app,微信小程序,微信企业支付,支付宝网页版,支付宝app,支付宝企业支付
Stars: ✭ 313 (+565.96%)
Mutual labels:  payment, alipay
Oss.clients.pay
开源支付SDK(标准库),主要打造微信支付,支付宝支付,标准库项目,同时支持.net framework和.net core
Stars: ✭ 314 (+568.09%)
Mutual labels:  payment, alipay
Gopay
golang语言实现的支付模块,支持支付宝app,支付宝网页版,微信app,微信公众号支付
Stars: ✭ 151 (+221.28%)
Mutual labels:  payment, alipay
Paylink
Paylink 是基于 .NET Core 、 ASP.NET Core 开发的支付SDK集,它极大简化了API调用及通知的处理流程。
Stars: ✭ 947 (+1914.89%)
Mutual labels:  payment, alipay
Icanpay
ICanPay是一个简单易用的支付平台支付处理类库,目前支持的支付平台有:支付宝(Alipay)、微信支付(WeChatPay)、财付通(Tenpay)、易宝(Yeepay)。
Stars: ✭ 136 (+189.36%)
Mutual labels:  payment, alipay
Sdk3rd
第三方SDK集成库,授权/分享/支付
Stars: ✭ 249 (+429.79%)
Mutual labels:  payment, alipay
Hsweb Payment
基于hsweb的开源聚合支付系统,多商户,多渠道,多配置.
Stars: ✭ 112 (+138.3%)
Mutual labels:  payment, alipay
payjs
基于 PAYJS 微信支付个人接口开发的 Package,可直接用于生产环境
Stars: ✭ 73 (+55.32%)
Mutual labels:  payment, alipay
Ijpay
IJPay 让支付触手可及,封装了微信支付、QQ支付、支付宝支付、京东支付、银联支付、PayPal 支付等常用的支付方式以及各种常用的接口。不依赖任何第三方 mvc 框架,仅仅作为工具使用简单快速完成支付模块的开发,可轻松嵌入到任何系统里。右上角点下小星星✨
Stars: ✭ 3,561 (+7476.6%)
Mutual labels:  payment, alipay
Pay
个人网站即时到账收款解决方案 / Personal website instant payment solution
Stars: ✭ 558 (+1087.23%)
Mutual labels:  payment, alipay
Omnipay Alipay
Alipay driver for the Omnipay PHP payment processing library
Stars: ✭ 559 (+1089.36%)
Mutual labels:  payment, alipay
Authnetjson
Library that abstracts Authorize.Net's JSON APIs. This includes the Advanced Integration Method (AIM), Automated Recurring Billing (ARB), Customer Information Manager (CIM), Transaction Reporting, Simple Integration Method (SIM), and Webhooks.
Stars: ✭ 14 (-70.21%)
Mutual labels:  payment

Alipay API PHP Library

About

This is a concise library written in PHP for the Alipay API merchant account for overseas merchants. It's basic and only offers support for creating direct pay by user transactions - also known as "Cross-border Website Payment". Alipay provides documentation and code examples at https://globalprod.alipay.com/order/integrationGuide.htm.

This library does not support Transaction Queries, Refunds and Reconciliation. I may add these another time unless someone else wants to take a crack at it.

Development

Alipay provides a test environment with a dummy account and test links assuming it's working.

Account

A test account is provided by Alipay.

Usage

All of this information is to the best of my knowledge, so there may be some inaccurate details here. You will need to automatically verify that the transaction is authentic by comparing their sign with yours that you compute from the response. You also need to verify that the notify_id Alipay sends to your return_url is valid by sending a GET request to https://mapi.alipay.com/gateway.do?service=notify_verify.... The notify_id is set to expire within a minute. If the transaction is authentic, you will receive a response of true; otherwise, it will be false.

return_url

The response will be in the GET data when Alipay sends the user back to your specified return_url. Check the trade_status once they return to see if it's already completed (TRADE_FINISHED).

notify_url

In some cases the payment verification takes longer on Alipay's end so they will ping your specified notify_url. The response will be in the POST data. Be sure to disable any CSRF security and remove the login requirement you might have in place for the notify_url.

Transaction Response Types

  • WAIT_BUYER_PAY - waiting for the buyer to pay.
  • TRADE_CLOSED - transaction closed without payment.
  • TRADE_FINISHED - payment was successful, and transaction is closed.

Response Handler

Be sure to store a unique ID to reference later on the return or notify URLs. For example, both the return_url and notify_url can be set to https://yoursite.com/account/add_funds/id/<id>. You can do a look-up in your own database to make sure the transaction hasn't already been completed in the past, and it can be linked to the user that initiated the request, along with other transaction details. After the response is handled and verified, you can then redirect the user to another page.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].