Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clt-sdk

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clt-sdk

  • 3.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Gem Version Analytics

Clt SDK

API client for President Collect Service.

Installation

Add this line to your application's Gemfile:

gem "clt-sdk"

And then execute:

$ bundle

Or install it yourself as:

$ gem install clt-sdk

Usage

Initialize
require "clt-sdk"

Clt.setup do |config|
  config.cvs_cust_id = "CVS_CUST_ID"
  config.cvs_cust_password = "CVS_CUST_PASSWORD"
  config.cvs_default_expire_day = 3
  config.cocs_link_id = "COCS_LINK_ID"
  config.cocs_hash_base = "COCS_HASH_BASE"
end

cvs_default_expire_day: Optional. ibon code will expired after this day (Default: 1)

Example

  • ibon

    cvs_client = Clt::Cvs.new
    
    Order Create
    result = cvs_client.order_create(
      service_url: 'SERVICE_URL',
      cust_order_number: 'TESTORDER000001',
      order_amount: 100,
      payer_name: '測試',
      payer_postcode: '100',
      payer_address: '測試地址',
      payer_mobile: '0987654321',
      payer_email: 'test@localhost.com'
    )
    

    Optional parameters: expire_date

    expired_date will overwrite cvs_default_expire_day setting.

    Order Query
    result = cvs_client.order_query(
      service_url: 'SERVICE_URL',
      process_code_update_time_begin: '2017-01-01T00:00:00+08:00',
      process_code_update_time_end: '2017-01-01T23:59:59+08:00'
    )
    
  • Credit Card

    cocs_client = Clt::CreditCard.new
    

    chk will be automatically generated.

    Order Create
    result = cocs_client.order_create(
      service_url: 'SERVICE_URL',
      cust_order_no: 'TESTORDER000001',
      order_amount: 100,
      order_detail: 'Order Test'
    )
    

    Optional parameters: cust_order_no, limit_product_id, chk

    cust_order_no will be automatically generated if empty.

    Order Cancel
    result = cocs_client.order_cancel(
      service_url: 'SERVICE_URL',
      cust_order_no: 'TESTORDER000001',
      order_amount: 100
    )
    

    Optional parameters: chk

    Order Refund
    result = cocs_client.order_refund(
      service_url: 'SERVICE_URL',
      cust_order_no: 'TESTORDER000001',
      order_amount: 100,
      refund_amount: 100
    )
    

    Optional parameters: chk

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/CalvertYang/clt-sdk.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 10 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc