Sha256: e419380d2119f0e7726a0ea7be1a281e05d23033d88bfb76fba3b704363dc1d4

Contents?: true

Size: 288 Bytes

Versions: 5

Compression:

Stored size: 288 Bytes

Contents

module PayuAPI
  class BuildSignature
    extend Dry::Initializer::Mixin

    option :body
    option :second_key

    def call
      signature = Digest::MD5.hexdigest("#{body}#{second_key}")
      "sender=checkout;signature=#{signature};algorithm=MD5;content=DOCUMENT"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
payu_api-0.1.7 lib/payu_api/build_signature.rb
payu_api-0.1.5 lib/payu_api/build_signature.rb
payu_api-0.1.4 lib/payu_api/build_signature.rb
payu_api-0.1.3 lib/payu_api/build_signature.rb
payu_api-0.1.2 lib/payu_api/build_signature.rb