The alipay program simulates the transfer of Alipay funds to a bank card. The program calculates the handling fee that the transfer party needs to provide based on the personal account information of the user, the transfer party. Handling fees need to be paid by the transfer party.
- input specifications
Inputs | type | Description | Restriction |
---|---|---|---|
isVerified | boolean | Whether the transfer party is real-name certified | |
transferInBalance | double | account balance assets of the transferor | |
transferInYebao | double | Transfer party account Yu'ebao assets | |
transferInBandCard | double | Transfer party account bank card assets | |
freeTransferLimit | double | The transferor's free transfer limit | |
transferMethod | int | transfer method 1 Transfer from balance 2 Transfer from Yu'e Bao 3 Transfer from the bound bank card/credit card |
only numbers 1, 2, 3 |
transfereeName | String | The name of the transferee | |
BandCard | String | Bank account number of the transferee | |
cardId | boolean | Bank card number of the transfer party | |
transferAmount | Double | transfer amount |
-
output specifications
The output parameters are "handlingFee", which type is double.
-
Description of MRs The service interface tested this time is TransfersCard. Twenty transformation relationships are designed in the design MRs. The specific expression of the transformation relationship is shown in the table.
No. R Rf 1.isVerified=false, transferMethod = 1 MR1 transferAmount_=transferAmount+1
(1.02*transferAmount<=moneyInBalance-1.02)handlingFee_=handlingFee+0.02 MR2 transferAmount_=transferAmount+1
(transferInBalance<1.02*transferAmount)handlingFee_=handlingFee=-1 2.isVerified=false, transferMethod = 2 MR3 transferAmount_=transferAmount+1
(moneyInYuebao-1.02>=1.02*transferAmount)handlingFee_=handlingFee+0.02 MR4 transferAmount_=transferAmount+1
(transferInYuebao <transferAmount*1.02)handlingFee_=handlingFee=-1 3.isVerified=false, transferMethod = 3 MR5 transferAmount_=transferAmount+1 handlingFee_=handlingFee=-1 4.isVerified=true, actualName!=name,transferMethod =1 MR6 transferAmount_=transferAmount+1
(transferInBalance <transferAmount)handlingFee_=handlingFee=-1 MR7 transferAmount_=transferAmount+1
(transferAmount<=freeTransferLimit-1<&&
transferAmount<=transferInBalance-1)handlingFee_=handlingFee=0 MR8 transferAmount_=transferAmount+1
(transferAmount>freeTransferLimit&&
1.02*transferAmount<=transferInBalance+0.02*freeTransferLimit-1.02)handlingFee_=handlingFee+0.02 MR9 transferAmount_=transferAmount+1
(transferAmount>freeTransferLimit&&transferAmount<=transferInBalance-1&&
1.02*transferAmount>transferInBalance+0.02*freeTransferLimit)handlingFee_=handlingFee=-1 5.isVerified=true, actualName!=name,transferMethod =2 MR10 transferAmount_=transferAmount+1
(transferInYuebao <transferAmount)handlingFee_=handlingFee=-1 MR11 transferAmount_=transferAmount+1
(transferInYuebao>=transferAmount+1)handlingFee_=handlingFee=0 6.isVerified=true, actualName!=name,transferMethod =3 MR12 transferAmount_=transferAmount+1
(transferInBandCard <transferAmount)handlingFee_=handlingFee=-1 MR13 transferAmount_=transferAmount+1
(transferAmount<=freeTransferLimit-1&&transferAmount<=transferInBandCard-1)handlingFee_=handlingFee=0 MR14 transferAmount_=transferAmount+1
(transferAmount>=freeTransferLimit&&
1.02*transferAmount<=transferInBandCard+0.02*freeTransferLimit-1.02)handlingFee_=handlingFee+0.02 MR15 transferAmount_=transferAmount+1
(transferAmount>freeTransferLimit&&transferAmount<=transferInBandCard-1&&
1.02*transferAmount>transferInBandCard+0.02*freeTransferLimit)handlingFee_=handlingFee=-1 7.isVerified=true, actualName=name,transferMethod =1 MR16 transferAmount_=transferAmount+1
(transferInBalance <transferAmount)handlingFee_=handlingFee=-1 MR17 transferAmount_=transferAmount+1
(transferInBalance>=transferAmount+1)handlingFee_=handlingFee=0 8.isVerified=true, actualName=name,transferMethod =2 MR18 transferAmount_=transferAmount+1
(transferInYuebao <transferAmount)handlingFee_=handlingFee=-1 MR19 transferAmount_=transferAmount+1
(transferInYuebao>=transferAmount+1)handlingFee_=handlingFee=0 9.isVerified=true, actualName=name,transferMethod =3,bandCard=cardId MR20 transferAmount_=transferAmount+1 handlingFee_=handlingFee=-1