Giter Site home page Giter Site logo

Comments (2)

SeungpilPark avatar SeungpilPark commented on August 12, 2024

원인: 플러그인쪽에서 referece transaction 에 대해서도 토큰 밸리데이션을 수행하기 때문에 걸리는 문제였음

아래와 같이 플러그인 소스를 수정함.

# Populate the Payer id if missing
          puts options

          # baid(reference_id) 가 포함된 요청은 token 밸리데이션을 수행할 필요 없다.
          # baid(reference_id) 가 포함된 요청은 options[:payer_id] 가 항상 같이 있다고 가정한다.
          
          unless options[:reference_id]
            options[:payer_id] = ::Killbill::Plugin::ActiveMerchant::Utils.normalized(properties_hash, :payer_id)
            begin
              
              puts 'begin'

              options[:payer_id] ||= find_payer_id(options[:token],
                                                   kb_account_id,
                                                   context.tenant_id,
                                                   payment_processor_account_id)
            rescue => e

              puts 'Maybe invalid token'

              # Maybe invalid token?
              response = @response_model.create(:api_call                     => api_call_type,
                                                :kb_account_id                => kb_account_id,
                                                :kb_payment_id                => kb_payment_id,
                                                :kb_payment_transaction_id    => kb_payment_transaction_id,
                                                :transaction_type             => transaction_type,
                                                :authorization                => nil,
                                                :payment_processor_account_id => payment_processor_account_id,
                                                :kb_tenant_id                 => context.tenant_id,
                                                :success                      => false,
                                                :created_at                   => Time.now.utc,
                                                :updated_at                   => Time.now.utc,
                                                :message                      => { :payment_plugin_status => :CANCELED, :exception_class => e.class.to_s, :exception_message => e.message }.to_json)
              return response.to_transaction_info_plugin(nil)
            end
          end

from killbill.

jinyoung avatar jinyoung commented on August 12, 2024

baid = billing agreement id
reference transaction = recurred transaction

from killbill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.