forked from go-packages/paypal
Merge pull request #37 from logpacker/issue/31
Change deprecated POST payout?sync_mode=true to async
This commit is contained in:
commit
b1a843f748
|
@ -24,7 +24,7 @@
|
||||||
* POST /v1/payments/orders/**ID**/do-void
|
* POST /v1/payments/orders/**ID**/do-void
|
||||||
* POST /v1/identity/openidconnect/tokenservice
|
* POST /v1/identity/openidconnect/tokenservice
|
||||||
* GET /v1/identity/openidconnect/userinfo/?schema=**SCHEMA**
|
* GET /v1/identity/openidconnect/userinfo/?schema=**SCHEMA**
|
||||||
* POST /v1/payments/payouts?sync_mode=true
|
* POST /v1/payments/payouts
|
||||||
* GET /v1/payment-experience/web-profiles
|
* GET /v1/payment-experience/web-profiles
|
||||||
* POST /v1/payment-experience/web-profiles
|
* POST /v1/payment-experience/web-profiles
|
||||||
* GET /v1/payment-experience/web-profiles/**ID**
|
* GET /v1/payment-experience/web-profiles/**ID**
|
||||||
|
|
|
@ -216,7 +216,7 @@ func TestCreatePayment(t *testing.T) {
|
||||||
CancelURL: "http://..",
|
CancelURL: "http://..",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
pr, err := c.CreatePayment(p)
|
_, err := c.CreatePayment(p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Error creating payment.")
|
t.Errorf("Error creating payment.")
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,11 @@ package paypalsdk
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
// CreateSinglePayout submits a payout with a synchronous API call, which immediately returns the results of a PayPal payment.
|
// CreateSinglePayout submits a payout with an asynchronous API call, which immediately returns the results of a PayPal payment.
|
||||||
// For email payout set RecipientType: "EMAIL" and receiver email into Receiver
|
// For email payout set RecipientType: "EMAIL" and receiver email into Receiver
|
||||||
// Endpoint: POST /v1/payments/payouts?sync_mode=true
|
// Endpoint: POST /v1/payments/payouts
|
||||||
func (c *Client) CreateSinglePayout(p Payout) (*PayoutResponse, error) {
|
func (c *Client) CreateSinglePayout(p Payout) (*PayoutResponse, error) {
|
||||||
req, err := c.NewRequest("POST", fmt.Sprintf("%s%s", c.APIBase, "/v1/payments/payouts?sync_mode=true"), p)
|
req, err := c.NewRequest("POST", fmt.Sprintf("%s%s", c.APIBase, "/v1/payments/payouts"), p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &PayoutResponse{}, err
|
return &PayoutResponse{}, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user