通过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第三方库


热门话题
Android上已连接音频输入设备的java列表   java是创建类的新对象还是使用静态方法?   Java:Shift/Rotate对象数组   Java Casting ArrayIterator<Object>   在java中返回布尔值时出错   无法确定文本文件读入程序(java)中的各种元素   Java Swing JToolBar   JAVAlang.IllegalStateException执行Ghost4J(Linux 32对64位)   jvm如何增加ubuntu系统的java堆化?   java CORS策略“AccessControlAllowOrigin”(Anguar 8和Servlet)   使用dagger 2的java视图依赖项注入   单元测试中RxJava的java模拟活动生命周期   arraylist中的Java打印字符串   java返回值显示为0.0。为什么会这样?   java是clientserver应用程序所必需的MVC吗?   ByteToMessageDecoder类中的java内存泄漏   java将大量文档写入firestore   GWT项目中的java TomcatMaven插件。两者之间的区别是什么:org。科德豪斯。魔咒和组织。阿帕奇。公猫maven插件   java swing:向JTree项添加自定义图形按钮