ohze / 1pay

scala/ play library for working with 1pay

Home Page:http://sandinh.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scala/ play library for working with 1pay

CI

Install

1pay is published to maven center.

add to build.sbt: libraryDependencies += "com.sandinh" %% "1pay" % 1payVersion

Usage

  1. implement sd.Uid2Name, sd.pay.sms1pay.SmsAddCoin

  2. set sd.pay.sms1pay.secret in your play's application.conf

  3. define check & charge actions in your play's Controller

class Sms @Inject() (sms1Pay: SMS) {
    def check =  Action.async { implicit req =>
        sms1Pay.check.map(Ok(_))
    }
    def charge =  Action.async { implicit req =>
        sms1Pay.charge.map(Ok(_))
    }
}

Changelog

see CHANGES.md

Licence

This software is licensed under the Apache 2 license: http://www.apache.org/licenses/LICENSE-2.0

Copyright 2015-2109 Sân Đình (https://sandinh.com)

About

scala/ play library for working with 1pay

http://sandinh.com


Languages

Language:Scala 100.0%