Giter Site home page Giter Site logo

pi-pay's Introduction

raincloud-pay

介绍

移动支付

集成引包

配置文件

//测试支付网关
r3.pipay.url=https://test.pay2.piplus.cn
r3.pipay.downbill.url=

代码实例

@Autowired
PayApi payApi;

//支付
public void mircopay(){

    MircoPayEntity mircoPayEntity = new MircoPayEntity();
    mircoPayEntity.setDeveloperId("001");
    Timestamp timestamp = new Timestamp(System.currentTimeMillis());
    log.info(timestamp.toString());
    mircoPayEntity.setTimestamp(timestamp.toString());
    mircoPayEntity.setAuthCode("284089011704405656");
    mircoPayEntity.setBody("苹果");
    mircoPayEntity.setOutTradeNo("000000000001");
    mircoPayEntity.setTotalAmount(1);
    mircoPayEntity.setCustomerId("3A47E6D7573A05840E3613FB39E0DA84");
    mircoPayEntity.setStoreCode("001");
    payApi.mircopay(mircoPayEntity);

}

//支付查询
public void orderquery(){

    OrderQueryEntity orderQueryEntity = new OrderQueryEntity();
    orderQueryEntity.setDeveloperId("001");
    Timestamp timestamp = new Timestamp(System.currentTimeMillis());
    log.info(timestamp.toString());
    orderQueryEntity.setTimestamp(timestamp.toString());
    orderQueryEntity.setTradeNo("2019112622001412545718949776");
    orderQueryEntity.setCustomerId("3A47E6D7573A05840E3613FB39E0DA84");
    orderQueryEntity.setStoreCode("001");
    payApi.orderquery(orderQueryEntity);

}

//退款
public void refund(){

    RefundEntity refundEntity = new RefundEntity();
    refundEntity.setDeveloperId("001");
    Timestamp timestamp = new Timestamp(System.currentTimeMillis());
    log.info(timestamp.toString());
    refundEntity.setTimestamp(timestamp.toString());
    refundEntity.setOutTradeNo("000000000001");
    refundEntity.setOutRefundNo("1000300200001");
    refundEntity.setCustomerId("3A47E6D7573A05840E3613FB39E0DA84");
    refundEntity.setStoreCode("001");
    refundEntity.setRefundAmount(1);
    refundEntity.setTotalAmount(1);
    payApi.refund(refundEntity);

}

//二维码支付
public void precreate(){

    PrecreateEntity precreateEntity = new PrecreateEntity();
    precreateEntity.setDeveloperId("001");
    Timestamp timestamp = new Timestamp(System.currentTimeMillis());
    log.info(timestamp.toString());
    precreateEntity.setTimestamp(timestamp.toString());
    precreateEntity.setPrecreateType(PrecreateType.ALIPAY.getValue());
    precreateEntity.setBody("苹果");
    precreateEntity.setOutTradeNo("000000000003");
    precreateEntity.setTotalAmount(1);
    precreateEntity.setCustomerId("3A47E6D7573A05840E3613FB39E0DA84");
    precreateEntity.setStoreCode("001");
    payApi.precreate(precreateEntity);

}

//撤销
public void reverse(){

    ReverseEntity reverseEntity = new ReverseEntity();
    reverseEntity.setDeveloperId("001");
    Timestamp timestamp = new Timestamp(System.currentTimeMillis());
    log.info(timestamp.toString());
    reverseEntity.setTimestamp(timestamp.toString());
    reverseEntity.setTradeNo("2019112622001412545718949776");
    reverseEntity.setCustomerId("3A47E6D7573A05840E3613FB39E0DA84");
    reverseEntity.setStoreCode("001");
    payApi.reverse(reverseEntity);

}

pi-pay's People

Contributors

hahajingnt avatar 15706193653 avatar

Watchers

James Cloos avatar  avatar

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.