Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json: cannot unmarshal string into Go struct field LinkMetaResponseEntity.link_meta.upi_intent of type bool #77

Open
viveknathani opened this issue Sep 30, 2024 · 3 comments

Comments

@viveknathani
Copy link

getting the following error in the PGCreateLink method

json: cannot unmarshal string into Go struct field LinkMetaResponseEntity.link_meta.upi_intent of type bool

relevant snippet:

import (
    cashfree "github.com/cashfree/cashfree-pg/v4"
)

req := &cashfree.CreateLinkRequest{
    LinkId:       linkId,
    LinkAmount:   createPaymentLinkRequest.Amount,
    LinkCurrency: createPaymentLinkRequest.Currency,
    LinkPurpose:  createPaymentLinkRequest.Description,
    CustomerDetails: cashfree.LinkCustomerDetailsEntity{
        CustomerPhone: createPaymentLinkRequest.UserPhoneNumber,
        CustomerEmail: &createPaymentLinkRequest.UserEmail,
    },
    LinkExpiryTime: &linkExpiresAtFormatted,
    LinkMeta: &cashfree.LinkMetaResponseEntity{
        ReturnUrl: &cashfreeRedirectUrl,
    },
    LinkNotify: &cashfree.LinkNotifyEntity{
        SendEmail: cashfree.PtrBool(true),
    },
}

createdLink, httpResponse, err := cashfree.PGCreateLink(
    &cashfree.XApiVersion,
    req,
    &internalRequestId,
    nil,
    &http.Client{},
)

if err != nil {
    return nil, err
}
@suhas-cashfree
Copy link
Collaborator

Let me check and get back to you

@Yash-jakkula
Copy link

I am also facing the same issue is there any update or a way to solve it??

@suhas-cashfree
Copy link
Collaborator

Try with the latest version go get github.com/cashfree/cashfree-pg/v4 and let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants