Repository navigation
Move payment transaction approval and update to settlement and add settlement payout read methods - #229
Open
tuncaserhat wants to merge 2 commits into
Open
Move payment transaction approval and update to settlement and add settlement payout read methods#229tuncaserhat wants to merge 2 commits into
tuncaserhat wants to merge 2 commits into
Conversation
…ttlement payout read methods
# Conflicts: # adapter/settlement.go # tests/settlement_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Payment transaction approval and update move to the settlement adapter, and the settlement reporting adapter gets read methods for the new payout model. Payout data is removed from payment responses; read it from the new payout methods instead.
Migration guide: https://developer.craftgate.io/migration/settlement-payout
Models:
PaymentTxPayoutResponse,PayoutItem,PayoutCompletedItem(replacesSearchPayoutCompletedTransactionsResponse),SettlementRowResponse(replacesPayoutDetailResponse),SettlementRowItem,SearchPaymentTransactionPayoutsRequest,SearchPayoutCompletedItemsRequest(replacesSearchPayoutCompletedTransactionsRequest).MerchantType,SettlementSource,PayoutApprovalStatus,PayoutItemSubject,SettlementRowItemSubject.Payout,MerchantPayoutAmount,SubMerchantMemberPayoutAmount,SubMerchantMemberPayoutRatefromPaymentTransactionResponse; the same plusPayoutStatusfromReportingPaymentTransactionResponse.Payout,PayoutStatus,PayoutDetailTransactionResponse,RetrievePayoutDetailsRequest.FailedReasonCodeonPaymentTransactionsApprovalResponse,SettlementRowIdonPayoutRowResponse.tests/payment_test.gototests/settlement_test.goandtests/settlement_reporting_test.go.Evidence
master(one conflict inadapter/payment.go: kept the upstreamRetrieveBnplOffersreturn type and dropped the three methods that moved toSettlement);go build ./...andgo vet ./...pass. The tests intests/call the sandbox and were not run.Merge Danger
Door: one-way
Blast Radius: merchants
Compile-time breaks for users who call
ApprovePaymentTransactions,DisapprovePaymentTransactionsorUpdatePaymentTransactiononPayment(now onSettlement),SearchPayoutCompletedTransactionsorRetrievePayoutDetails, or use any removed field or type above. Runtime: nothing changes for code still on an older client version; the old endpoints keep working until their announced shutdown.