Sha256: 2a11cf853bbb4c4e6a5595003a26fb4a5287876c852ab7c12eb1e189219e079a
Contents?: true
Size: 715 Bytes
Versions: 6
Compression:
Stored size: 715 Bytes
Contents
module ActiveMerchant #:nodoc: module Billing #:nodoc: module PaypalCommonAPI DUPLICATE_REQUEST_CODE = '11607' alias_method :original_successful?, :successful? # Note: this may need more thoughts when/if we want to support MsgSubID # See https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECRelatedAPIOps/#idempotency # For now, we just want to correctly handle a subsequent payment using a one-time token # (error "A successful transaction has already been completed for this token.") def successful?(response) response[:error_codes] == DUPLICATE_REQUEST_CODE ? false : original_successful?(response) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems