通过Paguelo Facil网关进行支付的接口

pfpi的Python项目详细描述


pfpi(Paguelo Facil支付界面)

简单的python模块通过paguelo facil支付网关进行支付。

要求

  • python 2.7.x

安装

  1. 安装pfpi模块:
$ pip install pfpi

如何添加新的信用卡。

frompfpi.modelsimportCreditCardServicecommerce_key='abcdef'production_mode=False# Change to True if you want use the production environmentcc=CreditCardService(commerce=commerce_key,firstname='first name',lastname='last name',email='example@domain.com',description='payment description',cc_number='4111111111111111',ccv2='123',cc_expiration='2019-12',production_mode=production_mode)result=cc.call()# Add new credit cardprintresult# return a JSON object with the result

如何付款。

frompfpi.modelsimportPaymentServicecommerce_key='abcdef'production_mode=False# Change to True if you want use the production environmentp=PaymentService(commerce=commerce_key,firstname='first name',lastname='last name',email='example@domain.com',description='payment description',amount=25.00,cc_number='4111111111111111',ccv2='123',cc_expiration='2019-12',production_mode=production_mode)result=p.call()# Do Paymentprintresult# return a JSON object with the result

如何使用信用卡上的代币付款

frompfpi.modelsimportTokenPaymentService,CreditCardServicecommerce_key='abcdef'production_mode=False# Change to True if you want use the production environmentcc=CreditCardService(commerce=commerce_key,firstname='first name',lastname='last name',email='example@domain.com',description='payment description',cc_number='4111111111111111',ccv2='123',cc_expiration='2019-12',production_mode=production_mode)result=cc.call()# get the credit card tokentoken=result['token']p=TokenPaymentService(commerce=commerce_key,firstname='first name',lastname='last name',email='example@domain.com',description='payment description',amount=25.00,token=token,production_mode=production_mode)result=p.call()# Do Paymentprintresult# return a JSON object with the result

卸载pfpi

$ pip uninstall pfpi

其他信息

本模块基于以下文档link

发行说明:

  • 1.0.0:添加信用卡和付款的服务。
  • 1.0.1:在调用API服务之前应用验证。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
netbeans根据命名约定返回布尔类的getter的Java名称   java如何在MessageFormat中使用单引号   java如何在整数数组中只对奇数排序,而将偶数保留在其原始位置?   自定义ArrayAdapter中未定义java构造函数   java joda时间格式化程序解析yyyyymmdd(额外一小时)   java Spring引导控制器测试始终返回404   java如何提取类文件以获取该类文件中的类?   JTable java列不会显示   java Selenium Web驱动程序输出错误的Web表行数   当应用程序在mac上打开时,java SWT选项卡项会从页面上消失   java如何将html文件映射到过滤器   swing Java计算一段时间内两点之间的转换   javawebsphere和javax。xml。ws。spi。提供者:提供者组织。阿帕奇。axis2。jaxws。spi。提供者不是子类型   For循环在Java中没有按预期继续?   java如何配置gson以排除0个整数值   java读取一个由tab分隔的文件,并将单词放入ArrayList中   java我需要做什么才能让LiveConnect重新工作?   sqlservermerge2xml&使用java提取这些数据并将其存储在db表中   java如何在模型中添加新对象时通知网格