New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

myclear

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

myclear

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Myclear

A unofficial myclear ruby gem.

Myclear official document: https://fpxexchange.myclear.org.my:8443/MerchantIntegrationKit/

note:Password is required when accessing the official document, please go to Myclear for the password.

Installation

Add this line to your application's Gemfile:

gem 'myclear'

or

gem 'myclear', github: 'lanceyb/myclear'

And then execute:

$ bundle

Or install it yourself as:

$ gem install myclear

Configuration

Myclear.fpx_version = '7.0'
Myclear.seller_exchange_id = 'YOUR SELLER EXCHANGE ID'
Myclear.seller_id = 'YOUR SELLER ID'
Myclear.private_key = 'YOUR RSA PRIVATE KEY'
Myclear.fpx_certification = 'THE FPX CERTIFICATION'

# Myclear.debug_mode = true # Enable parameter check. Default is true.
# Myclear.fpx_standby_certification = 'THE STANDBY FPX CERTIFICATIO

eg:

if Rails.env.production?
  Myclear.fpx_version = '7.0'
  Myclear.seller_exchange_id = 'YOUR SELLER EXCHANGE ID'
  Myclear.seller_id = 'YOUR SELLER ID'
  Myclear.private_key = 'YOUR RSA PRIVATE KEY'
  Myclear.fpx_certification = 'THE FPX CERTIFICATION'
else
  Myclear.fpx_version = '7.0'
  Myclear.seller_exchange_id = 'EX00000000'
  Myclear.seller_id = 'SE00000000'
  Myclear.private_key = File.read(File.expand_path('./EX00000000.key', Rails.root))
  Myclear.fpx_certification = File.read(File.expand_path('./fpxuat.cer', Rails.root))
end

Service

bank list(银行列表)

Myclear::Service.bank_list_enquiry

Authorization Request(申请支付)

Myclear::Service.authorization_request_params({ARGUMENTS})
Example
Myclear::Service.authorization_request_params({
  fpx_msgToken:         '01',
  fpx_sellerExOrderNo:  'EXORDERNO0000',
  fpx_sellerTxnTime:    '20170817140102',
  fpx_sellerOrderNo:    'ORDERNO000000',
  fpx_txnCurrency:      'MYR',
  fpx_txnAmount:        '1.00',
  fpx_buyerEmail:       'test@example.com',
  fpx_buyerName:        '',
  fpx_buyerBankId:      'TEST0021',
  fpx_buyerBankBranch:  'SBI BANK A',
  fpx_buyerAccNo:       '',
  fpx_buyerId:          '',
  fpx_makerName:        '',
  fpx_buyerIban:        '',
  fpx_productDesc:      '1 goods'
})
Arugments
KeyAllow BlankDescription
fpx_msgTokenNIndicate business model. 01 - B2C / 02 - B2B1 / 03 - B2B2
fpx_sellerExOrderNoNUnique ID generate by Exchange for each transaction originating form an Exchange. Not Supported: Ampersan (&) and Apostrophe (').
fpx_sellerTxnTimeNDate and time transaction originated from Merchant. YYYYMMDDHHmmSS (in MYT).
fpx_sellerOrderNoNOrder number generated by Merchant. Not Supported: Ampersan (&) and Apostrophe (').
fpx_txnCurrencyNTransaction currency. Default value = MYR
fpx_txnAmountNTotal amount.
fpx_buyerEmailYBuyer email address. Allow blank.
fpx_buyerNameYBuyer name. Allow blank.
fpx_buyerBankIdNProvided by FPX - ties to Bank that Buyer has an account in.
fpx_buyerBankBranchNBank's branch code that Buyer opened his account. Not Supported: Slash(/), Ampesand(&) and Apostrophe(').
fpx_buyerAccNoYBuyer account number
fpx_buyerIdYBuyer identification number. Not Supported: Slash(/), Ampersand(&) and Apostrophe(').
fpx_makerNameYBuyer representative (Maker) who initiate the transaction.
pfx_buyerIbanYBuyer IBAN
fpx_productDescYProduct Description

Authorization Enquiry

Myclear::Service.authorization_enquiry({ARGUMENTS})
Example
Myclear::Service.authorization_enquiry({
  fpx_msgToken:         '01',
  fpx_sellerExOrderNo:  'EXORDERNO0000',
  fpx_sellerTxnTime:    '20170817140102',
  fpx_sellerOrderNo:    'ORDERNO000000',
  fpx_txnCurrency:      'MYR',
  fpx_txnAmount:        '1.00',
  fpx_buyerEmail:       'test@example.com',
  fpx_buyerName:        '',
  fpx_buyerBankId:      'TEST0021',
  fpx_buyerBankBranch:  'SBI BANK A',
  fpx_buyerAccNo:       '',
  fpx_buyerId:          '',
  fpx_makerName:        '',
  fpx_buyerIban:        '',
  fpx_productDesc:      '1 goods'
})

note : 请求AE接口的参数,保持与AR时一致

Arugments
KeyAllow BlankDescription
fpx_msgTokenNIndicate business model. 01 - B2C / 02 - B2B1 / 03 - B2B2
fpx_sellerExOrderNoNUnique ID generate by Exchange for each transaction originating form an Exchange. Not Supported: Ampersan (&) and Apostrophe (').
fpx_sellerTxnTimeNDate and time transaction originated from Merchant. YYYYMMDDHHmmSS (in MYT).
fpx_sellerOrderNoNOrder number generated by Merchant. Not Supported: Ampersan (&) and Apostrophe (').
fpx_txnCurrencyNTransaction currency. Default value = MYR
fpx_txnAmountNTotal amount.
fpx_buyerEmailYBuyer email address. Allow blank.
fpx_buyerNameYBuyer name. Allow blank.
fpx_buyerBankIdNProvided by FPX - ties to Bank that Buyer has an account in.
fpx_buyerBankBranchNBank's branch code that Buyer opened his account. Not Supported: Slash(/), Ampesand(&) and Apostrophe(').
fpx_buyerAccNoYBuyer account number
fpx_buyerIdYBuyer identification number. Not Supported: Slash(/), Ampersand(&) and Apostrophe(').
fpx_makerNameYBuyer representative (Maker) who initiate the transaction.
pfx_buyerIbanYBuyer IBAN
fpx_productDescYProduct Description

Verify callback(验证回调)

Myclear::Service.verify_params(params)

Contributing

Bug reports and pull requests are welcome.

Make a pull request

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Please write unit test with your code if necessary.

FAQs

Package last updated on 18 Aug 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