Repository navigation
fix(setups): add the flattened klarna, paypal, tabby and stc pay fields - #277
Open
rodrigojara-cko wants to merge 1 commit into
Open
rodrigojara-cko wants to merge 1 commit into
rodrigojara-cko wants to merge 1 commit into
Conversation
Payment Setup returns each payment method's next action directly on the method. The Go types dropped it on unmarshal, so the Klarna client token and the PayPal order ID could not be read. Adds the action and the request fields the spec defines for Klarna, PayPal, Tabby and stc pay.
🟢 Risk Classification: LOWApproval route: AI Auto-Approval Classification reasons
Operational gates
Files analysed: 2 wall-e 2026.06.19-02 · policy |
🔬 Debug — why this classification?Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.
Kinds:
See issue #3 for the proposal to formalise this map as Appendix A of the standards doc. wall-e 2026.06.19-02 · debug |
|
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 Setup returns the next action of each payment method directly on the method (
payment_methods.klarna.action,payment_methods.paypal.action,payment_methods.stcpay.action). The Go types did not model it, soGetPaymentSetupdropped it and a merchant could not read the Klarna client token or the PayPal order ID needed to launch those flows. This adds the action and the other fields the spec defines for Klarna, PayPal, Tabby and stc pay.Changes
payments/setups/setups.go:PaymentMethodAction: new read-onlyOrderId(order_id, PayPal). Docs list thetypeper method (sdkfor Klarna and PayPal,otpfor stc pay).KlarnaPaymentMethod: read-onlyActionandIban.PaypalPaymentMethod:BrandName(max 127 characters),ShippingPreferenceand read-onlyAction.PaypalShippingPreferencewithPaypalShippingPreferenceNoShipping,PaypalShippingPreferenceGetFromFileandPaypalShippingPreferenceSetProvidedAddress.StcpayPaymentMethod: read-onlyAction;Otpdocumented as write only.TabbyPaymentMethod:PaymentTypes([]string).payments/setups/setups_fields_test.go: literal wire keys for the PayPal and Tabby request fields (read-onlyactionnot sent when unset), everyPaypalShippingPreferencevalue, deserialization ofactionfrom Klarna, PayPal and stc pay plus Klarnaibanfrom a response with the spec examples, and a roundtrip of every new property.API Reference
POST /payments/setups:payment_methods.paypal.brand_name,payment_methods.paypal.shipping_preference,payment_methods.tabby.payment_typesPUT /payments/setups/{id}GET /payments/setups/{id}POST /payments/setups/{id}/confirm/{payment_method_name}Breaking changes
None. Only new fields and a new type.
PaypalPaymentMethod.UserActionstays astring.README
No change needed.