This commit is contained in:
Aliaksandr Pliutau 2016-12-01 11:57:34 +07:00
parent 0bbdd821f8
commit c4c61ec4bc
2 changed files with 3 additions and 1 deletions

View File

@ -137,7 +137,7 @@ func (c *Client) log(r *http.Request, resp *http.Response) {
reqDump := fmt.Sprintf("%s %s. Data: %s", r.Method, r.URL.String(), r.Form.Encode())
respDump, _ := httputil.DumpResponse(resp, true)
c.Log.Write([]byte("Request: " + string(reqDump) + "\nResponse: " + string(respDump) + "\n\n"))
c.Log.Write([]byte("Request: " + reqDump + "\nResponse: " + string(respDump) + "\n\n"))
}
}

View File

@ -2,11 +2,13 @@ package paypalsdk
import (
"fmt"
"os"
"testing"
)
func TestCreateDirectPaypalPayment(t *testing.T) {
c, _ := NewClient(testClientID, testSecret, APIBaseSandBox)
c.SetLog(os.Stdout)
c.GetAccessToken()
amount := Amount{