pingpp 文件夹下是 Python SDK 文件,
example 文件夹里面是简单的接入示例,该示例仅供参考。
pip install pingpp
或使用 setup.py 手动安装
python setup.py install
pingpp.api_key = 'APP-KEY'ch = pingpp.Charge.create(
order_no='123456789',
channel='alipay',
amount=1,
subject='test-subject',
body='test-body',
currency='cny',
app=dict(id='YOUR-APP-ID'),
client_ip='127.0.0.1'
)pingpp.Charge.retrieve('CHARGE-ID')pingpp.Charge.all()ch = pingpp.Charge.retrieve('CHARGE-ID')
re = ch.refunds.create()ch = pingpp.Charge.retrieve('CHARGE-ID')
re = ch.refunds.retrieve('REFUND-ID')ch = pingpp.Charge.retrieve('CHARGE-ID')
re = ch.refunds.retrieve('REFUND-ID')pingpp.RedEnvelope.create()pingpp.RedEnvelope.retrieve('RED-ID')pingpp.RedEnvelope.all()详细信息请参考 API 文档。