OnApprove

struct OnApprove
extension OnApprove : Decodable, Encodable

This is sent to Firebase we have two cases

  • Case 1: We don’t have a billing token and we pass the payerID and paymentID with orderID

  • Case 2: We have a billing token so we only need to pass the orderID and billingToken for now, unless things change in API.

  • Creates a new instance by decoding from the given decoder.

    This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.

    Declaration

    Swift

    init(from decoder: Decoder) throws