feat(payment): add mobile Alipay precreate deep link#4734
Merged
Wei-Shaw merged 1 commit intoJul 23, 2026
Conversation
Contributor
|
All contributors have signed the CLA. ✅ |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
wjx2951874
force-pushed
the
feat/alipay-mobile-precreate-deep-link
branch
from
July 22, 2026 11:18
ac259dd to
7914433
Compare
Contributor
Author
|
@Wei-Shaw 该 PR 已同步到最新 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
ALIPAY_MOBILE_PRECREATE_DEEP_LINKsetting for the official Alipay provider.alipay.trade.precreate, launches the returned dynamic QR URL through the Alipay Scheme, and shows a QR fallback only when launch appears to fail.wap.paybehavior unchanged when the setting is disabled.Mobile behavior
alipays://platformapi/startapp?saId=10000007&qrcode=<encoded qr_code>with exactly oneencodeURIComponentpass.window.location.assignimmediately after order creation.visibilitychange,document.hidden, orpagehideas a successful handoff and suppress the failure fallback.Payment integrity
Risk
alipay.trade.precreate.Verification
go test -p=1 -tags=unit ./internal/payment/provider ./internal/handler ./internal/servergo test -p=1 -tags=unit ./internal/service -run 'Test(ShouldUseAlipayMobilePrecreate|IsOfficialAlipayProviderInstance|AlipayMobilePrecreateEnvironmentOverride|ParsePaymentConfig|DuplicatePaymentNotificationDoesNotReprocessCompletedBalanceOrder|PaymentNotificationRejectsAmountMismatchBeforeFulfillment)$'go test ./migrationsgo test -tags=integration ./internal/repository -run '^$'(applied migrations 185 and 186 against temporary PostgreSQL/Redis)go vet ./internal/payment/provider ./internal/handler ./internal/servicepnpm vitest run alipayDeepLink.spec.ts PaymentStatusPanel.spec.ts paymentFlow.spec.ts PaymentView.spec.ts SettingsView.spec.ts(73 tests passed)pnpm vue-tsc --noEmitpnpm run buildsrc/api/__tests__/admin.system.rollback.spec.tsbecause that test expects two request arguments while the existing implementation supplies a timeout option as the third argument.Rollback
ALIPAY_MOBILE_PRECREATE_DEEP_LINK=falseor disable the option in Admin Settings to restore the original mobile WAP flow immediately.false.No production deployment or production credential changes are included.