Giter Club home page Giter Club logo

paypal's Introduction

PayPal

实现功能:

  1. 使用PayPal标准集成API从后台发起支付请求,并非从from表单中提交,提升了安全性。
  2. 实现了IPN消息验证函数。

如何使用:

使用对象方式调用:

Pay PayPal = new Pay("PayPal沙盒测试地址或正式地址");

PayPal.PostPay(new PayPalObj()
   {
       business = "卖家邮箱/卖家账号",
       item_name ="订单名称",
       quantity = "订单数量",
       amount = "金额",
       currency_code = "货币",
       return_url = "支付成功跳转地址",
       notify_url = "支付成功的异步回调地址",
       cancel_return = "用户取消支付跳转地址",
       custom="用于IPN回传用户自定义的参数",
       charset = "编码格式"
  });

使用对象方式只支持以上参数,如果需要更多参数,请使用自定义参数方式调用。

自定义参数方式调用:

 Dictionary<string, string> Dt_Parames = new Dictionary<string, string>();
 /*添加自定义参数:*/
 Dt_Prame.Add("business", "[email protected]");
 Dt_Prame.Add("quantity", "10");
 ....

 Pay PayPal=new Pay("PayPal沙盒测试地址或正式地址");
 PayPal.PostPay(Dt_Parames);

使用注意:

IPN验证以及支付请求如果出现建立SSL/TSL通道失败的异常,请使用以下方式解决问题:

  1. 安装.net 版本4.5。

  2. 使用已下代码,该代码使用的.net版本最低也要4.0,而且不一定会成功。

System.Net.ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;

此项目沙盒测试账号(只能测试):

  1. 商户账户:[email protected]
  2. 客户账号:[email protected] 密码:12345678

沙盒账号申请地址

沙盒地址


PayPal参数列表

  1. PayPal标准集成流程以及支付参数列表
  2. IPN流程以及消息参数列表
  3. Pay支付的货币码列表

paypal's People

Contributors

asenlins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

paypal's Issues

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.