Repository navigation
feat(token,payment): fund a VCN from a prior charge and allow Visa capture - #78
Merged
Merged
Conversation
…pture token-cli: - New `payment-tokens vcn-quote --amount|--amount-cents [--currency] [--card-bin]` returns the card limit, fee, charge total and the BIN the card will use. - `payment-tokens create --type vcn` accepts `--funding-charge-no`, `--amount-cents` and `--card-bin`; with a funding charge no freeze/fee prompt is shown. - `--external-transaction-id` sends `external_transaction_id` (the field the platform reads; `--external-tx-id` sends `external_tx_id`, which it ignores). payment-cli: - `payments capture` accepts `--payment-brand visa`.
Releases the VCN funding flags (vcn-quote, --funding-charge-no, --card-bin) and Visa capture. Additive and backward compatible, so patch bumps.
When --funding-charge-no is given, the interactive confirmation now fetches GET /payment-tokens/vcn-quote and shows Freeze (total_cents) and Fee (fee_cents) instead of hiding the warning. A rejected quote stops before the create request. --yes skips the quote call.
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.
背景
虚拟卡(VCN)发卡方从 AgentCard 换成 PhotonPay:先用用户已绑的卡(银联 / Visa / EVO)扣一笔「卡额度 + 手续费」,平台再拿这笔扣款号开卡。CLI 需要支持报价和带扣款号开卡;Visa 出资还要求 payment-cli 能对 Visa 令牌扣款。
改动
token-cli 0.10.4
payment-tokens vcn-quote --amount|--amount-cents [--currency] [--card-bin]:返回卡额度、手续费、应扣总额和开卡将用的 BIN。BIN 不可用时报价就拒绝,不扣款。payment-tokens create --type vcn新增--funding-charge-no、--amount-cents、--card-bin;带扣款号时,交互确认前调vcn-quote按平台报价显示冻结额(total_cents)和手续费(fee_cents),不再用 5% 估算;报价被拒时不发开卡请求;--yes不调报价。--external-transaction-id发external_transaction_id(平台实际读取的字段;旧的--external-tx-id发的external_tx_id平台不读)。payment-cli 0.5.5
payments capture允许--payment-brand visa。依赖
平台对应改动:agenzo-platform
feat/photonpay-vcn(GET /payment-tokens/vcn-quote、funding_charge_no、card_bin)。合入发版后,orchestrator-base 的TOKEN_CLI_VERSION/PAYMENT_CLI_VERSION升到 0.10.4 / 0.5.5。测试
npm run test:1036 passed,2 skipped;npm run build通过;check:lockfile通过。