<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tajhul Faijin Aliyudin on Medium]]></title>
        <description><![CDATA[Stories by Tajhul Faijin Aliyudin on Medium]]></description>
        <link>https://medium.com/@tajhulfaijin?source=rss-ae0b7472e817------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*x7O9i1i06nQWl3a_.</url>
            <title>Stories by Tajhul Faijin Aliyudin on Medium</title>
            <link>https://medium.com/@tajhulfaijin?source=rss-ae0b7472e817------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 07:02:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tajhulfaijin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Custom HTTP Client Braintree Go-lang Google App Engine]]></title>
            <link>https://medium.com/google-cloud/custom-http-client-braintree-go-lang-google-app-engine-a1dfca0a3780?source=rss-ae0b7472e817------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1dfca0a3780</guid>
            <category><![CDATA[payment-gateway]]></category>
            <category><![CDATA[braintree]]></category>
            <category><![CDATA[app-engine]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Tajhul Faijin Aliyudin]]></dc:creator>
            <pubDate>Sat, 17 Mar 2018 13:54:31 GMT</pubDate>
            <atom:updated>2018-03-20T23:22:39.554Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QrP3uWcGAZfNWFDCwZOdmQ.jpeg" /><figcaption>Image source <a href="https://blog.charmes.net/images/gopherswrench.jpg">https://blog.charmes.net/images/gopherswrench.jpg</a></figcaption></figure><h3>Overview</h3><p>Braintree is one of the biggest payment gateway provider that providing tons of capabilities to perform payment operations.</p><p>Google App Engine is a fully managed platform that completely abstracts away infrastructure so developer only focus on code</p><blockquote><em>Braintree is not providing (yet) official SDK for Go-lang. Gratefully someone has made it perfectly — available for us.</em></blockquote><blockquote>Braintree Go SDK : <a href="https://github.com/lionelbarrow/braintree-go">https://github.com/lionelbarrow/braintree-go</a></blockquote><h3>Problem</h3><p>In past few months ago I was struggled when running it on Google App Engine machine, either in local GAE (dev_appserver<strong>)</strong> or when it was published to the GAE cloud.</p><p>The SDK throwing this error message :</p><blockquote>“Unable to generate client token : Post <a href="https://api.sandbox.braintreegateway.com/merchants/xxxxx/client_token">https://api.sandbox.braintreegateway.com:443/merchants/xxxxx/client_token</a>: http.DefaultTransport and http.DefaultClient are not available in App Engine. See <a href="https://cloud.google.com/appengine/docs/go/urlfetch/">https://cloud.google.com/appengine/docs/go/urlfetch/</a>&quot;</blockquote><p>Someone has similiar issue with me :</p><blockquote><a href="https://github.com/lionelbarrow/braintree-go/issues/49">https://github.com/lionelbarrow/braintree-go/issues/49</a></blockquote><p>This issue appears because App Engine doesn’t allow us to perform outbound request directly using native Go-lang http client, everything should be passed over <a href="https://godoc.org/google.golang.org/appengine/urlfetch">urlfetch</a>.</p><h3>Solution</h3><p>So we need to attach custom http client (GAE url fetch client) when we creating Braintree client.</p><p>Here’s two example that covered those issue :</p><ul><li>Create Braintree client ( had a problem here ) :</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c0fd36181c3484236ff2323c7b953093/href">https://medium.com/media/c0fd36181c3484236ff2323c7b953093/href</a></iframe><ul><li>Solution, create Braintree client with custom http client :</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/06c946f687a62e2addfaaae16a3eba5a/href">https://medium.com/media/06c946f687a62e2addfaaae16a3eba5a/href</a></iframe><p>Now, it’s working perfectly on GAE machine.</p><p>That’s all :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1dfca0a3780" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/custom-http-client-braintree-go-lang-google-app-engine-a1dfca0a3780">Custom HTTP Client Braintree Go-lang Google App Engine</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>