feat: add WeChat Pay, Redis logging, storage tiers and personal albums
Replace virtual payments with WeChat Pay API v3 and verify callbacks and order polling. Cache WeChat access tokens in Redis and write structured Zap logs. Support configurable capacity plans across the API, admin and mini program, with purchase snapshots and quota enforcement. Allow personal albums before binding and share them with the current partner. Update deployment configuration and domain routing.
This commit is contained in:
@@ -12,16 +12,16 @@ test('GET business parameters and POST bodies use clean paths with auth', async
|
||||
const response = await api.diaryList({page:2,page_size:20});
|
||||
assert.equal(response.page_size,20);
|
||||
await api.periodVisibleSet({period_visible:0});
|
||||
assert.equal(calls[0].url,'https://past.sundynix.cn/api/diaryList?page=2&pageSize=20');
|
||||
assert.equal(calls[0].url,'https://we.sundynix.cn/api/diaryList?page=2&pageSize=20');
|
||||
assert.equal(calls[0].header.Authorization,'Bearer test-token');
|
||||
assert.equal(calls[1].url,'https://past.sundynix.cn/api/periodVisibleSet');
|
||||
assert.equal(calls[1].url,'https://we.sundynix.cn/api/periodVisibleSet');
|
||||
assert.equal(calls[1].data.periodVisible,0);
|
||||
});
|
||||
test('multipart upload retains action and token when Android omits headers',async()=>{
|
||||
let upload;
|
||||
const {uploadFileCompat}=load('utils/request.js',{getStorageSync:()=> 'test-token',compressImage(o){o.fail();},uploadFile(o){upload=o;o.success({statusCode:200,data:'{"success":true,"path":"uploads/test.jpg"}'});} });
|
||||
await uploadFileCompat({url:'https://past.sundynix.cn/api/uploadPartnerAvatar',filePath:'test.jpg',name:'file',formData:{partner_id:87}});
|
||||
assert.equal(upload.url,'https://past.sundynix.cn/api/uploadPartnerAvatar?token=test-token');
|
||||
await uploadFileCompat({url:'https://we.sundynix.cn/api/uploadPartnerAvatar',filePath:'test.jpg',name:'file',formData:{partner_id:87}});
|
||||
assert.equal(upload.url,'https://we.sundynix.cn/api/uploadPartnerAvatar?token=test-token');
|
||||
assert.equal(upload.formData.action,'uploadPartnerAvatar');
|
||||
assert.equal(upload.formData.token,'test-token');
|
||||
assert.equal(upload.formData.partnerId,87);
|
||||
|
||||
Reference in New Issue
Block a user