@xiashe/sdk 0.1.25 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alipayWallet.mjs +10 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
package/alipayWallet.mjs
CHANGED
|
@@ -861,7 +861,7 @@ export async function diagnoseAlipay402Resource(input, options = {}) {
|
|
|
861
861
|
message: '没有找到本地付款尝试;请不要因此重复付款。'
|
|
862
862
|
};
|
|
863
863
|
}
|
|
864
|
-
|
|
864
|
+
const result = {
|
|
865
865
|
ok: state.status !== 'failed' && state.status !== 'wallet_command_failed',
|
|
866
866
|
status: state.status || 'unknown',
|
|
867
867
|
provider: 'alipay-agent-payment',
|
|
@@ -877,6 +877,15 @@ export async function diagnoseAlipay402Resource(input, options = {}) {
|
|
|
877
877
|
} : {}),
|
|
878
878
|
updatedAt: state.updatedAt || null
|
|
879
879
|
};
|
|
880
|
+
// TRADE_PROGRESS_FAILED is deliberately generic in the official wallet
|
|
881
|
+
// output. Attach a redacted report to the one diagnose command an Agent is
|
|
882
|
+
// already required to run, rather than relying on it to remember a second
|
|
883
|
+
// optional command after a failed payment.
|
|
884
|
+
if (state.lastFailureCode === 'wallet_trade_progress_failed') {
|
|
885
|
+
const support = await createAlipay402SupportReport({ resourceUrl }, options);
|
|
886
|
+
if (support.ok && support.report) result.supportReport = support.report;
|
|
887
|
+
}
|
|
888
|
+
return result;
|
|
880
889
|
}
|
|
881
890
|
|
|
882
891
|
/**
|
package/index.mjs
CHANGED