Commit Graph

187 Commits

Author SHA1 Message Date
Alex Pliutau
4d9251997c Payments V2 2019-03-27 09:27:53 +01:00
Alex Pliutau
5af7837061 Add v1/v2 note 2019-03-26 15:39:18 +01:00
Alex Pliutau
114f3ab4be
Merge pull request #77 from apourchet/apourchet/fix-race-sendwithauth
Locking SendWithAuth to fix race condition
2019-03-01 10:49:21 +01:00
Alex Pliutau
6f2ea3a580
Merge pull request #80 from CodeLingoBot/rewrite
Fix function comments based on best practices from Effective Go
2019-03-01 10:48:30 +01:00
Antoine Pourchet
4303b79440 Added comments for clarity 2019-02-28 20:17:03 -08:00
CodeLingo Bot
560c513235 Fix function comments based on best practices from Effective Go
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
2019-02-28 21:52:50 +00:00
Antoine Pourchet
bb976e776e Locking SendWithAuth to fix race condition
When SendWithAuth gets called in a multithreaded environment on the
same Client object, a concurrent read and write of c.Token might happen
in GetAccessToken.
This patch solves the issue by locking the client while we get a new
access token in SendWithAuth.
2019-02-26 23:26:37 -08:00
Alex Pliutau
7a8d9e5531
Merge pull request #75 from meitarim/master
added ListBillingPlans
2019-01-14 10:17:11 +01:00
meitar
c23e130afd added ListBillingPlans 2019-01-14 07:06:05 +02:00
Alex Pliutau
3896aaa167
Merge pull request #73 from lindroth/master
added GetPaymentsWithFilter and Filter to list filtered payments
2018-12-16 14:07:16 +01:00
Alex Pliutau
e31da31dcc
Merge pull request #70 from cristaloleg/master
Get rid of escape characters
2018-12-16 14:04:53 +01:00
Alex Pliutau
9c283e9d42 #69: add payment response 2018-12-16 13:26:41 +01:00
Alex Pliutau
f17191367d Fix UTs 2018-12-16 13:24:11 +01:00
Alex Pliutau
2eacad2d5d #71 Quantity field of Item struct type must change from string to uint32 type 2018-12-16 13:06:54 +01:00
Rickard Lindroth
d5a45e7e9a
Update README.md
wrong parameter name for listing payments
2018-12-10 14:18:00 +01:00
Rickard Lindroth
36f64e9a3b added GetPaymentsWithFilter and Filter to list filtered payments 2018-12-10 12:54:15 +01:00
Oleg Kovalov
f04460162e Get rid of escape characters 2018-10-13 23:45:06 +02:00
Alex Pliutau
f7201fdd87
Merge pull request #68 from logpacker/fix-quantity-type
#66: fix item.quantity type
2018-10-11 16:11:22 +07:00
Alex Pliutau
e7b24a69f2 #66: fix item.quantity type 2018-10-11 15:59:54 +07:00
Alex Pliutau
2148226300
Merge pull request #67 from logpacker/go-111
Add go 1.11 to travis
2018-10-10 20:51:36 +07:00
Alex Pliutau
caff1125ce Add go 1.11 to travis 2018-10-10 20:47:17 +07:00
Alex Pliutau
f49da25ce1
Merge pull request #64 from Shamanoid/master
feat: adds ApplicationContext support
2018-08-29 14:54:03 +07:00
Alex Pliutau
af8120920e Simplify return values 2018-08-29 14:52:31 +07:00
Vincent Biret-Chaussat
174211b78b
feat: adds ApplicationContext support 2018-08-28 10:43:53 +01:00
Alex Pliutau
af41710b9d
Merge pull request #61 from netlify/master
Add temporary field to webexperience profile
2018-07-18 09:40:22 +07:00
Bryce Kahle
732c3d08bf Add temporary field to webexperience profile 2018-06-14 11:40:51 -04:00
Alex Pliutau
07b625244a
Merge pull request #58 from cwebley/add-payee
add payee struct to Transaction
2018-05-04 09:56:38 +07:00
Cameron Webley
99da38f9c2 add payee struct to Transaction 2018-04-19 16:56:10 -05:00
Alex Pliutau
b0bf27bc89
Merge pull request #55 from mlgd/patch-1
Add missing url fields in transaction
2018-03-22 23:02:01 +07:00
mlgd
7f6d76c5bd
Add missing url fields in transaction
Add NotifyURL et OrderURL
2018-03-20 17:56:13 +01:00
Alex Pliutau
d1c1dd2026
Merge pull request #51 from lordkhonsu/master
added json field `transaction_fee` to Sale struct
2018-02-08 13:49:07 +07:00
Alex Pliutau
acdf616064
Merge pull request #53 from soyersoyer/master
Add allowed_payment_method option
2018-02-08 13:48:30 +07:00
soyer
4ef3a06b52 Add allowed_payment_method option 2018-02-07 21:01:07 +01:00
Robert Schmalholz
535dec8992 use existing Currency struct for transaction_fee 2018-01-22 16:32:18 +01:00
Robert Schmalholz
96b47cc1ed added json field transaction_fee to Sale struct 2018-01-22 14:05:43 +01:00
Alex Pliutau
7c225b0dd2
Merge pull request #50 from rodneyswa/master
Add additional returned fields to ExecutePayment; Add PatchPayment() …
2018-01-15 11:26:49 +07:00
Rodney Smith
3ca3bc9a11 Add additional returned fields to ExecutePayment; Add PatchPayment() capability, and unit tests 2018-01-13 23:37:24 -07:00
Alex Pliutau
e6df3b7cfe
Merge pull request #48 from logpacker/refactor/err-handling-if-one-line
Make one-line if err != nil conditions
2017-11-23 09:20:10 +07:00
Alex Pliutau
cd22892aec Make one-line if err != nil conditions 2017-11-23 09:15:11 +07:00
Alex Pliutau
be5f959441
Merge pull request #47 from schoukri/add_payout_methods
Add payout methods: GetPayout, GetPayoutItem, and CancelPayoutItem
2017-11-10 09:18:00 +07:00
Sam Choukri
8c5eb07be8 fixed json unmarshaling of ErrorResponse in PaymentItem 2017-11-07 17:56:24 -08:00
Sam Choukri
f1166b8b90 Added methods: GetPayout, GetPayoutItem, and CancelPayoutItem 2017-11-07 15:58:58 -08:00
Alex Pliutau
f52224cf7e
Merge pull request #45 from schoukri/master
Fix json parsing of the `details` field in API error responses
2017-10-29 14:45:24 +07:00
Alex Pliutau
481eb3337f
Merge pull request #44 from NicholasAsimov/fix-granttokenfromauthocode
Fix GrantNewAccessTokenFromAuthCode method
2017-10-29 14:44:47 +07:00
Sam Choukri
3beae33bc0 Fix json parsing of the details field in API error responses with a new ErrorResponseDetail type.
The `details` field in the json response from API errors is an array of json objects (not a single object).
Also, the value for the "link" object is not a string but rather another nested array of json objects.
The parsing of the `details` json field is now correctly unmarshalled into a new `ErrorResponseDetail` type
instead of the previously broken `map[string]string` type.
2017-10-26 10:15:12 -07:00
Alex Pliutau
c95c0b9449 Merge pull request #43 from NicholasAsimov/fix-zero-time
Set correct "zero time" in SetAccessToken
2017-10-26 08:23:13 +07:00
Nicholas Asimov
06b13fe21f Fix GrantNewAccessTokenFromAuthCode method.
Changes made:
1. Body is sent as a form-urlencoded values instead of json
2. Basic auth is used for authorization instead of an access token
2017-10-21 16:24:02 +03:00
Nicholas Asimov
ac5b4d7658 PayPal returns booleans in user info as strings. Notify json unmarshaler about that 2017-10-21 16:23:56 +03:00
Nicholas Asimov
6bc1110944 Correctly handle the case when PayPal returns token expires_in field as a string
Credit goes to oauth2 package.
https://github.com/golang/oauth2/blob/master/internal/token.go#L62
2017-10-21 16:23:48 +03:00
Nicholas Asimov
96fea7c1ae Set correct "zero time" in SetAccessToken 2017-10-21 16:22:04 +03:00