<commit_before>module OffsitePayments #:nodoc:
  module Integrations #:nodoc:
    module Molpay
      mattr_accessor :acknowledge_url
      self.acknowledge_url = 'https://www.onlinepayment.com.my/MOLPay/API/chkstat/returnipn.php'

      def self.notification(post)
        Notification.new(post)
      end

      def self.return(query_string, options={})
        Return.new(query_string, options)
      end

      #  (Optional Parameter) = channel //will generate URL to go directly to specific channel, e.g maybank2u, cimb
      #  Please refer MOLPay API spec for the channel routing
      class Helper < OffsitePayments::Helper
        include ActiveUtils::RequiresParameters

        SUPPORTED_CURRENCIES = ['MYR', 'USD', 'SGD', 'PHP', 'VND', 'IDR', 'AUD', 'CNY', 'THB', 'GBP', 'EUR', 'HKD']

        # Defaults to en
        SUPPORTED_LANGUAGES = ['en', 'cn']

        SERVICE_URL = 'https://www.onlinepayment.com.my/MOLPay/pay/'.freeze

        mapping :account, 'merchantid'
        mapping :amount, 'amount'
        mapping :order, 'orderid'
        mapping :customer, :name  => 'bill_name',
                           :email => 'bill_email',
                           :phone => 'bill_mobile'

        mapping :description, 'bill_desc'
        mapping :language, 'langcode'
        mapping :country, 'country'
        mapping :currency, 'cur'
        mapping :return_url, 'returnurl'
        mapping :signature, 'vcode'

        attr_reader :amount_in_cents, :verify_key, :channel

        def credential_based_url
          service_url = SERVICE_URL + @fields[mappings[:account]] + "/"<commit_msg>Update molpay.rb<commit_after>module OffsitePayments #:nodoc:
  module Integrations #:nodoc:
    module Molpay
      mattr_accessor :acknowledge_url
      self.acknowledge_url = 'https://www.onlinepayment.com.my/MOLPay/API/chkstat/returnipn.php'

      def self.notification(post)
        Notification.new(post)
      end

      def self.return(query_string, options={})
        Return.new(query_string, options)
      end

      def self.notification(post, options = {})
        Notification.new(post, options)
      end
      
      #  (Optional Parameter) = channel //will generate URL to go directly to specific channel, e.g maybank2u, cimb
      #  Please refer MOLPay API spec for the channel routing
      class Helper < OffsitePayments::Helper
        include ActiveUtils::RequiresParameters

        SUPPORTED_CURRENCIES = ['MYR', 'USD', 'SGD', 'PHP', 'VND', 'IDR', 'AUD', 'CNY', 'THB', 'GBP', 'EUR', 'HKD']

        # Defaults to en
        SUPPORTED_LANGUAGES = ['en', 'cn']

        SERVICE_URL = 'https://www.onlinepayment.com.my/MOLPay/pay/'.freeze

        mapping :account,             'merchantid'
        mapping :amount,              'amount'
        mapping :order,               'orderid'
        mapping :customer, :name  =>  'bill_name',
                           :email =>  'bill_email',
                           :phone =>  'bill_mobile'

        mapping :description,         'bill_desc'
        mapping :language,            'langcode'
        mapping :country,             'country'
        mapping :currency,            'cur'
        mapping :return_url,          'returnurl'
        mapping :notify_url,          'callbackurl'
        mapping :signature,           'vcode'

        attr_reader :amount_in_cents, :verify_key, :channel

        def credential_based_url
          service_url = SERVICE_URL + @fields[mappings[:account]] + "/"
{'fraction_non_alphanumeric': 0.1132509341764875, 'fraction_numerical': 0.0005748778384593274, 'mean_word_length': 2.2861189801699715, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5206320', 'n_tokens_mistral': 1074, 'n_tokens_neox': 1021, 'n_words': 242}