Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
49bc3a11
authored
May 24, 2026
by
Seefs
Committed by
GitHub
May 24, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(payment): hide classic Waffo Pancake settings (#5085)
parent
0354c38b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
service/waffo_pancake.go
+3
-0
service/waffo_pancake_test.go
+12
-0
web/classic/src/components/settings/PaymentSetting.jsx
+0
-15
No files found.
service/waffo_pancake.go
View file @
49bc3a11
...
@@ -103,6 +103,9 @@ func CreateWaffoPancakeCheckoutSession(ctx context.Context, params *WaffoPancake
...
@@ -103,6 +103,9 @@ func CreateWaffoPancakeCheckoutSession(ctx context.Context, params *WaffoPancake
if
strings
.
TrimSpace
(
params
.
BuyerIdentity
)
==
""
{
if
strings
.
TrimSpace
(
params
.
BuyerIdentity
)
==
""
{
return
nil
,
fmt
.
Errorf
(
"missing buyer identity"
)
return
nil
,
fmt
.
Errorf
(
"missing buyer identity"
)
}
}
if
strings
.
TrimSpace
(
params
.
OrderMerchantExternalID
)
==
""
{
return
nil
,
fmt
.
Errorf
(
"missing order merchant external id"
)
}
client
,
err
:=
newWaffoPancakeClient
()
client
,
err
:=
newWaffoPancakeClient
()
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"build Waffo Pancake client: %w"
,
err
)
return
nil
,
fmt
.
Errorf
(
"build Waffo Pancake client: %w"
,
err
)
...
...
service/waffo_pancake_test.go
View file @
49bc3a11
package
service
package
service
import
(
import
(
"context"
"fmt"
"fmt"
"strings"
"strings"
"testing"
"testing"
...
@@ -40,6 +41,17 @@ func setupWaffoPancakeTestDB(t *testing.T) *gorm.DB {
...
@@ -40,6 +41,17 @@ func setupWaffoPancakeTestDB(t *testing.T) *gorm.DB {
return
db
return
db
}
}
func
TestCreateWaffoPancakeCheckoutSession_RequiresOrderMerchantExternalID
(
t
*
testing
.
T
)
{
session
,
err
:=
CreateWaffoPancakeCheckoutSession
(
context
.
Background
(),
&
WaffoPancakeCreateSessionParams
{
ProductID
:
"PROD_checkout_guard"
,
BuyerIdentity
:
WaffoPancakeBuyerIdentityFromUserID
(
1
),
})
require
.
Error
(
t
,
err
)
require
.
Nil
(
t
,
session
)
require
.
Contains
(
t
,
err
.
Error
(),
"missing order merchant external id"
)
}
func
TestResolveWaffoPancakeTradeNo_UsesWebhookOrderIDWhenLocalOrderExists
(
t
*
testing
.
T
)
{
func
TestResolveWaffoPancakeTradeNo_UsesWebhookOrderIDWhenLocalOrderExists
(
t
*
testing
.
T
)
{
db
:=
setupWaffoPancakeTestDB
(
t
)
db
:=
setupWaffoPancakeTestDB
(
t
)
...
...
web/classic/src/components/settings/PaymentSetting.jsx
View file @
49bc3a11
...
@@ -52,9 +52,6 @@ const PaymentSetting = () => {
...
@@ -52,9 +52,6 @@ const PaymentSetting = () => {
StripeMinTopUp
:
1
,
StripeMinTopUp
:
1
,
StripePromotionCodesEnabled
:
false
,
StripePromotionCodesEnabled
:
false
,
WaffoPancakeMerchantID
:
''
,
WaffoPancakePrivateKey
:
''
,
WaffoPancakeReturnURL
:
''
,
'payment_setting.compliance_confirmed'
:
false
,
'payment_setting.compliance_confirmed'
:
false
,
'payment_setting.compliance_terms_version'
:
''
,
'payment_setting.compliance_terms_version'
:
''
,
'payment_setting.compliance_confirmed_at'
:
0
,
'payment_setting.compliance_confirmed_at'
:
0
,
...
@@ -165,11 +162,6 @@ const PaymentSetting = () => {
...
@@ -165,11 +162,6 @@ const PaymentSetting = () => {
case
'StripeMinTopUp'
:
case
'StripeMinTopUp'
:
newInputs
[
item
.
key
]
=
parseFloat
(
item
.
value
);
newInputs
[
item
.
key
]
=
parseFloat
(
item
.
value
);
break
;
break
;
case
'WaffoPancakeMerchantID'
:
case
'WaffoPancakePrivateKey'
:
case
'WaffoPancakeReturnURL'
:
newInputs
[
item
.
key
]
=
item
.
value
;
break
;
default
:
default
:
if
(
item
.
key
.
endsWith
(
'Enabled'
))
{
if
(
item
.
key
.
endsWith
(
'Enabled'
))
{
newInputs
[
item
.
key
]
=
toBoolean
(
item
.
value
);
newInputs
[
item
.
key
]
=
toBoolean
(
item
.
value
);
...
@@ -304,13 +296,6 @@ const PaymentSetting = () => {
...
@@ -304,13 +296,6 @@ const PaymentSetting = () => {
hideSectionTitle
hideSectionTitle
/>
/>
</
Tabs
.
TabPane
>
</
Tabs
.
TabPane
>
<
Tabs
.
TabPane
tab=
{
t
(
'Waffo Pancake 设置'
)
}
itemKey=
'waffo-pancake'
>
<
SettingsPaymentGatewayWaffoPancake
options=
{
inputs
}
refresh=
{
onRefresh
}
hideSectionTitle
/>
</
Tabs
.
TabPane
>
<
Tabs
.
TabPane
tab=
{
t
(
'Waffo 设置'
)
}
itemKey=
'waffo'
>
<
Tabs
.
TabPane
tab=
{
t
(
'Waffo 设置'
)
}
itemKey=
'waffo'
>
<
SettingsPaymentGatewayWaffo
<
SettingsPaymentGatewayWaffo
options=
{
inputs
}
options=
{
inputs
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment