I am implementing a payment system in my capsule. But getting error for using the currency in SPS payment method in endpoints.
payment {
amount (50)
currency (payInfo.currency)
item {
name ("abcd")
amount (50)
count (1)
}
tax {
amount (0)
}
}
Currently, we have used static amount, item details, etc.
Structure for Currency :
enum (Currency) {
symbol (USD)
symbol (EUR)
symbol (VUV)
}
PayInfo Structure:
structure (payInfo) {
property (currency) {
type (Currency)
min (Optional)
max (One)
}
}
Bixby Reference which I used :
https://bixbydevelopers.com/dev/docs/dev-guide/developers/actions.payments
----------------------------Issue 2----------------------------------------
We made a structure Information as
structure (Information){
property (amount) {
type (Amount)
min (Optional)
max (Many)
}
property (currency) {
type (Currency)
min (Optional)
max (Many)
}
}
And Structure Currency as
enum (Currency) {
symbol (USD)
symbol (EUR)
symbol (VUV)
}
After that In Action PaymentAction, we defined structure Information as a type for input payment.
action (PaymentAction) {
type(Commit)
collect {
input (payInfo) {
type (Information)
min (Optional)
}
}
output (makepayment)
}
And added one utterance in training as :
[g:PaymentAction] Make Payment
Through this our error gets resolved, But when we run code in simulator, getting Capsule Execution Error as Com.google.common.base.VerifyException: '' is not a valid ISO 4217 currency code.