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

bug report Quantity field of Item struct type must change from string to uint32 type #71

Closed
jiangdamalong opened this issue Oct 30, 2018 · 1 comment

Comments

@jiangdamalong
Copy link

// Item struct
Item struct {
	//Quantity    string `json:"quantity"`
            //Quantity    uint32 `json:"quantity"`
	Name        string `json:"name"`
	Price       string `json:"price"`
	Currency    string `json:"currency"`
	SKU         string `json:"sku,omitempty"`
	Description string `json:"description,omitempty"`
	Tax         string `json:"tax,omitempty"`
}
    //----------------types.go:290---------------------
    because paypal service response field type  is number not string such as 

{"id":"PAY-3AL75111WY384445VLPMDDZI","intent":"sale","state":"created","payer":{"payment_method":"paypal"},"transactions":[{"amount":{"total":"7.00","currency":"USD","details":{}},"description":"My Payment","item_list":{"items":[{"name":"name","description":"Desc","price":"7.00","currency":"USD","quantity":1}]},"related_resources":[]}],"create_time":"2018-10-30T10:26:45Z","links":[{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-3AL75111WY384445VLPMDDZI","rel":"self","method":"GET"},{"href":"https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-2NN28981E4508510W","rel":"approval_url","method":"REDIRECT"},{"href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-3AL75111WY384445VLPMDDZI/execute","rel":"execute","method":"POST"}]}

@plutov
Copy link
Owner

plutov commented Dec 16, 2018

Fixed in new release v1.1.2, please test

@plutov plutov closed this as completed Dec 16, 2018
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

2 participants