Giter VIP home page Giter VIP logo

alipay's Introduction

alipay

支付宝集成接口的 golang 实现

Build Status

示例:即时到账收款接口

r := Request{
	NotifyUrl: `http://192.168.1.1/dirpay/notify_url.php`, // 付款后异步通知页面
	ReturnUrl: `http://192.168.1.1/dirpay/return_url.php`, // 付款后返回页面
	OutTradeNo: `138329153`, // 订单号
	SellerEmail: `[email protected]`, // 支付宝用户名
	Service: `create_direct_pay_by_user`, // 不可改
	PaymentType: `1`, // 不可改
	Subject: `测试`, // 商品名称
	TotalFee: 1.03, // 价格
}

c := Config{
  	Partner: `xxxxxx`,   // 支付宝合作者身份 ID
  	Key: `xxxxxxxxxx`, // 支付宝交易安全校验码
}
  
// 输出的是 html 页面,会自动跳转到支付界面
NewPage(c, r, os.Stdout)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.