0

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

https://bixbydevelopers.com/dev/docs/reference/type/endpoints.action-endpoints.action-endpoint.payment-methods.sps.payment.currency

enter image description here

----------------------------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.

Rahul Gupta
  • 972
  • 11
  • 29

1 Answers1

0

I think the error message means payInfo is not found. It should be a concept as an input, not the structure name. Also I would recommend rename the structure to PayInfo instead of payInfo.

Please see the attached screenshot. enter image description here

  • Thanks for the response, through that 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. I updated my question as per the instruction, but something is still not working. – Rahul Gupta Feb 05 '20 at 13:12
  • 1
    Please raise a support ticket using the "contact support" in Bixby IDE with your capsule synced. Payment is advanced topic of Bixby. I cannot provide useful or accurate comments without the actual capsule. – BixbyDevSupport-Tokonyan Feb 05 '20 at 17:48