{"id":28621,"date":"2019-05-23T00:00:00","date_gmt":"2019-05-22T22:00:00","guid":{"rendered":"https:\/\/blexin.com\/braintree-per-i-pagamenti-nel-nostro-store\/"},"modified":"2021-05-20T19:17:08","modified_gmt":"2021-05-20T17:17:08","slug":"braintree-for-payments-in-our-store","status":"publish","type":"post","link":"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/","title":{"rendered":"Braintree for payments in our store"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"608\" data-attachment-id=\"28599\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/attachment\/778137c7-6b15-41d1-9d90-0792971c3a26-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/778137c7-6b15-41d1-9d90-0792971c3a26.png?fit=1024%2C608&amp;ssl=1\" data-orig-size=\"1024,608\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"778137c7-6b15-41d1-9d90-0792971c3a26\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/778137c7-6b15-41d1-9d90-0792971c3a26.png?fit=1024%2C608&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/778137c7-6b15-41d1-9d90-0792971c3a26.png?resize=1024%2C608&#038;ssl=1\" alt=\"\" class=\"wp-image-28599\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/778137c7-6b15-41d1-9d90-0792971c3a26.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/778137c7-6b15-41d1-9d90-0792971c3a26-980x582.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/778137c7-6b15-41d1-9d90-0792971c3a26-480x285.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As we were developing e-commerce for one of our clients, we needed to face the payments&#8217; management, both in terms of which type choose and of security problems. We need then to choose if it would be better to implement different payment methods (credit\/debit cards, PayPal and so&nbsp;on) with a diversified approach, or to opt for a third-party service, which manages the checkout process with an integrated way.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On the web, we found&nbsp;<strong>Braintree<\/strong>, a service provided by&nbsp;<strong>PayPal<\/strong>, that offers scalability, fastness, security in payments transaction, a lesser number of clicks to arrive at&nbsp;checkout, web and mobile optimization. As payment methods, it offers credit and debit cards, PayPal, Apple Pay, Google Pay and the main digital wallets.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Braintree&nbsp;<\/strong>provides a&nbsp;<a href=\"https:\/\/www.braintreepayments.com\/sandbox\" target=\"_blank\" rel=\"noreferrer noopener\">sandbox<\/a>, environment, on which we can register to obtain free credentials and test services, as we can see in the following image:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"739\" data-attachment-id=\"28601\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/attachment\/braintree_sandbox_landing_page-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_sandbox_landing_page.png?fit=1137%2C821&amp;ssl=1\" data-orig-size=\"1137,821\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"braintree_sandbox_landing_page\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_sandbox_landing_page.png?fit=1024%2C739&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_sandbox_landing_page.png?resize=1024%2C739&#038;ssl=1\" alt=\"\" class=\"wp-image-28601\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_sandbox_landing_page-1024x739.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_sandbox_landing_page-980x708.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_sandbox_landing_page-480x347.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Looking at the&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/developers.braintreepayments.com\/\" target=\"_blank\">documentation for developers<\/a>, we can display the Braintree\u2019s flow chart:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"855\" height=\"529\" data-attachment-id=\"28604\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/attachment\/braintree_flow_diagram-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_flow_diagram.png?fit=855%2C529&amp;ssl=1\" data-orig-size=\"855,529\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"braintree_flow_diagram\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_flow_diagram.png?fit=855%2C529&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_flow_diagram.png?resize=855%2C529&#038;ssl=1\" alt=\"\" class=\"wp-image-28604\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_flow_diagram.png 855w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_flow_diagram-480x297.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 855px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Two types of SDK are available:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>SDK Client<\/strong>: dedicated to frontend applications, it&nbsp;supports JavaScript, Android and IOS languages. It permits to recover users\u2019 payment information;<\/li><li><strong>SDK Server<\/strong>: &nbsp;dedicated to the Backend, available for .NET, Java, Ruby, Node.js, PHP and Python. It permits to make actions on collected payment information.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In order to use the SDK client, it\u2019s required an authorization process, which more flexible modality is surely the client Token. Furthermore, both SDKs use&nbsp;<a href=\"https:\/\/it.wikipedia.org\/wiki\/Nonce\" target=\"_blank\" rel=\"noreferrer noopener\">nonces<\/a>&nbsp;to refer to payment information, in order to avoid replay-attacks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Examples for all programming languages are available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In our solution, the frontend application is an Angular6 web app, with which we used the module&nbsp;<strong><em>ngx-braintree<\/em><\/strong>, a wrapper of the JavaScript Client SDK, which we integrated into the project. On client side, the module creates a drop-ui, that allows the user to insert his\/her data:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"266\" data-attachment-id=\"28606\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/attachment\/braintree_dropui_firstpage-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_firstpage.png?fit=1035%2C269&amp;ssl=1\" data-orig-size=\"1035,269\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"braintree_dropui_firstpage\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_firstpage.png?fit=1024%2C266&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_firstpage.png?resize=1024%2C266&#038;ssl=1\" alt=\"\" class=\"wp-image-28606\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_firstpage-1024x266.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_firstpage-980x255.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_firstpage-480x125.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The module is used in the app\u2019s main component&nbsp;<strong>AppComponent<\/strong>, this is how it presents itself:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\n@Component({\n\u00a0\u00a0selector: &quot;app-root&quot;,\n\u00a0\u00a0templateUrl: &quot;.\/app.component.html&quot;,\n\u00a0\u00a0styleUrls: &#x5B;&quot;.\/app.component.css&quot;]\n})\nexport class AppComponent {\n\u00a0\u00a0paymentResponse: any;\n\u00a0\u00a0chargeAmount = 11.11;\n\u00a0\n\u00a0\u00a0clientTokenURL =\u00a0 AppSettings.GET_CLIENT_TOKEN_URL;\n\u00a0\u00a0createPurchaseURL =\u00a0 AppSettings.CREATE_PURCHASE_URL;\n\u00a0\n\u00a0\u00a0onDropinLoaded(event) {\n\u00a0\u00a0\u00a0\u00a0console.log(&quot;dropin loaded...&quot;);\n\u00a0\u00a0}\n\u00a0\n\u00a0\u00a0onPaymentStatus(response): void {\n\u00a0\u00a0\u00a0\u00a0this.paymentResponse = response;\n\u00a0\u00a0}\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Here we defined&nbsp;<strong><em>chargeAmount<\/em><\/strong>&nbsp;as the amount of the transaction (statistically insert, for convenience),&nbsp;<strong><em>clientTokenURL&nbsp;<\/em><\/strong>as URL for the token request and&nbsp;<strong><em>createPurchaseURL<\/em><\/strong>, as URL for the transaction creation<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The HTML code of the component is instead:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;ngx-braintree\n\u00a0\u00a0\u00a0\u00a0&#x5B;clientTokenURL]=&quot;clientTokenURL&quot; \n\u00a0\u00a0\u00a0\u00a0&#x5B;createPurchaseURL]=&quot;createPurchaseURL&quot; \n\u00a0\u00a0\u00a0\u00a0&#x5B;chargeAmount]=&quot;chargeAmount&quot;\n\u00a0\u00a0\u00a0\u00a0(paymentStatus)=&quot;onPaymentStatus($event)&quot;\n\u00a0\u00a0\u00a0\u00a0&#x5B;showCardholderName]=&quot;true&quot;\n\u00a0\u00a0\u00a0\u00a0(dropinLoaded)=&quot;onDropinLoaded($event)&quot;\n\u00a0\u00a0\u00a0\u00a0&#x5B;buttonText]=&quot;&#039;Buy&#039;&quot;\n\u00a0\u00a0\u00a0\u00a0&#x5B;enablePaypalCheckout] = &quot;true&quot;\n\u00a0\u00a0\u00a0\u00a0&#x5B;currency]=&quot;&#039;EUR&#039;&quot;\n\u00a0\u00a0\u00a0\u00a0&#x5B;allowChoose]=&quot;true&quot;&gt;\n&lt;\/ngx-braintree&gt;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Where the module ngx-braintree is declared and the attributes for its correct functioning defined.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In detail, there are:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>clientTokenURL<\/strong>: URL of the service for the token request related to the transaction (mandatory);<\/li><li><strong>createPurchaseURL<\/strong>: : URL of the service for transaction creation (mandatory);<\/li><li><strong>chargeAmount<\/strong>: transaction amount (mandatory);<\/li><li><strong>paymentStatus<\/strong>: event that takes place when the payment process has been finished (mandatory);<\/li><li><strong>buttonText<\/strong>: title of the payment button;<\/li><li><strong>allowChoose<\/strong>: it defines if the user can choose a different payment method after she\/he has already filled in the data;<\/li><li><strong>showCardholderName<\/strong>: it allows to display a text box, where it is possible to fill in the name of the cardholder;<\/li><li><strong>enablePaypalCheckout<\/strong>: it permits to pay with the PayPal account (to enable it, it is needed to link the Braintree account to the PayPal account);<\/li><li><strong>currency<\/strong>: it defines the currency used to pay (the list of available currency is available here).<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For a backend project, we need a Web Api controller,&nbsp;<strong>BraintreeController<\/strong>, with two API methods:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\n&#x5B;HttpGet(&quot;getclienttoken&quot;)]\npublic IActionResult GetClientToken()\n{\n\u00a0\u00a0\u00a0\u00a0\/\/read Braintree configuration from appsettings.json\n\u00a0\u00a0\u00a0\u00a0var gateway = braintreeConfiguration.GetGateway();\n\u00a0\u00a0\u00a0\u00a0var clientToken = gateway.ClientToken.Generate();\n\u00a0\u00a0\u00a0\u00a0var clientTokenResponse = new ClientTokenResponse(clientToken);\n\u00a0\u00a0\u00a0\u00a0return new JsonResult(clientTokenResponse);\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">and<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\n&#x5B;HttpPost(&quot;createpurchase&quot;)]\npublic IActionResult CreatePurchase(&#x5B;FromBody]NonceRequest nonceRequest)\n{\n\u00a0\u00a0\u00a0\u00a0\/\/read Braintree configuration from appsettings.json\n\u00a0\u00a0\u00a0\u00a0var gateway = braintreeConfiguration.GetGateway();\n\u00a0\n\u00a0\u00a0\u00a0\u00a0var request = new TransactionRequest\n\u00a0\u00a0\u00a0\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Amount = nonceRequest.ChargeAmount,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0PaymentMethodNonce = nonceRequest.Nonce,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Options = new TransactionOptionsRequest\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0SubmitForSettlement = true\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0};\n\u00a0\n\u00a0\u00a0\u00a0\u00a0Result&lt;Transaction&gt; result = gateway.Transaction.Sale(request);\n\u00a0\u00a0\u00a0\u00a0return new JsonResult(result);\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>GetClientToken<\/strong>: it returns a token, which identifies&nbsp;the transaction and to&nbsp;<strong>CreatePurchase<\/strong>&nbsp;total amount and token information would be passed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">DTO used for information exchange,&nbsp;<strong>ClientTokenResponse<\/strong>&nbsp;and&nbsp;<strong>NonceRequest<\/strong>, are defined below:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic class ClientTokenResponse\n{\n\u00a0\u00a0\u00a0\u00a0public string Token { get; set; }\n\u00a0\n\u00a0\u00a0\u00a0\u00a0public ClientTokenResponse(string token)\n\u00a0\u00a0\u00a0\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Token = token;\n\u00a0\u00a0\u00a0\u00a0}\n}\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic class NonceRequest\n{\n\u00a0\u00a0\u00a0\u00a0public string Nonce { get; set; }\n\u00a0\u00a0\u00a0\u00a0public decimal ChargeAmount { get; set; }\n\u00a0\n\u00a0\u00a0\u00a0\u00a0public NonceRequest(string nonce)\n\u00a0\u00a0\u00a0\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Nonce = nonce;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ChargeAmount = ChargeAmount;\n\u00a0\u00a0\u00a0\u00a0}\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">For utility, we create the class&nbsp;<strong>BraintreeConfiguration<\/strong>&nbsp;which retrieves settings from the configuration file and generate the gateway to access to Braintree services&nbsp;<strong>BraintreeConfiguration<\/strong>&nbsp;looks like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\npublic class BraintreeConfiguration : IBraintreeConfiguration\n{\n\u00a0\u00a0\u00a0\u00a0public string Environment { get; set; }\n\u00a0\u00a0\u00a0\u00a0public string MerchantId { get; set; }\n\u00a0\u00a0\u00a0\u00a0public string PublicKey { get; set; }\n\u00a0\u00a0\u00a0\u00a0public string PrivateKey { get; set; }\n\u00a0\u00a0\u00a0\u00a0private IBraintreeGateway BraintreeGateway { get; set; }\n\u00a0\u00a0\u00a0\u00a0private readonly IConfiguration _config;\n\u00a0\n\u00a0\u00a0\u00a0\u00a0public BraintreeConfiguration(IConfiguration config)\n\u00a0\u00a0\u00a0\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0_config = config;\n\u00a0\u00a0\u00a0\u00a0}\n\u00a0\n\u00a0\u00a0\u00a0\u00a0public IBraintreeGateway CreateGateway()\n\u00a0\u00a0\u00a0\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Environment = GetConfigurationSetting(&quot;BraintreeEnvironment&quot;);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0MerchantId = GetConfigurationSetting(&quot;BraintreeMerchantId&quot;);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0PublicKey = GetConfigurationSetting(&quot;BraintreePublicKey&quot;);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0PrivateKey = GetConfigurationSetting(&quot;BraintreePrivateKey&quot;);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return new BraintreeGateway(Environment, MerchantId, PublicKey, PrivateKey);\n\u00a0\u00a0\u00a0\u00a0}\n\u00a0\n\u00a0\u00a0\u00a0\u00a0public string GetConfigurationSetting(string setting)\n\u00a0\u00a0\u00a0\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return _config.GetSection(&quot;AppSettings&quot;)&#x5B;setting];\n\u00a0\u00a0\u00a0\u00a0}\n\u00a0\n\u00a0\u00a0\u00a0\u00a0public IBraintreeGateway GetGateway()\n\u00a0\u00a0\u00a0\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if (BraintreeGateway == null)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0BraintreeGateway = CreateGateway();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return BraintreeGateway;\n\u00a0\u00a0\u00a0\u00a0}\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Configuration parameters would be recovered from the&nbsp;<strong><em>appsettings.json<\/em><\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\n{\n\u00a0\u00a0&quot;AppSettings&quot;: {\n\u00a0\u00a0\u00a0\u00a0&quot;BraintreeEnvironment&quot;: &quot;******&quot;,\n\u00a0\u00a0\u00a0\u00a0&quot;BraintreeMerchantId&quot;: &quot;******&quot;,\n\u00a0\u00a0\u00a0\u00a0&quot;BraintreePublicKey&quot;: &quot;******&quot;,\n\u00a0\u00a0\u00a0\u00a0&quot;BraintreePrivateKey&quot;: &quot;******&quot;\n\u00a0\u00a0}\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Running both projects (for any kind of CORS problem on Google Chrome, it\u2019s advised to use the extension&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/chrome.google.com\/webstore\/detail\/allow-control-allow-origi\/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=it\" target=\"_blank\">Allow-Control-Allow-Origin:*<\/a>), we obtain a first screen where we display drop-ui, where we can choose the payment method and fill in our data:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"266\" data-attachment-id=\"28611\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/attachment\/braintree_dropui_firstpage-1-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_firstpage-1.png?fit=1035%2C269&amp;ssl=1\" data-orig-size=\"1035,269\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"braintree_dropui_firstpage-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_firstpage-1.png?fit=1024%2C266&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_firstpage-1.png?resize=1024%2C266&#038;ssl=1\" alt=\"\" class=\"wp-image-28611\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_firstpage-1-1024x266.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_firstpage-1-980x255.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_firstpage-1-480x125.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">from which, with a click on one of the drop-ui entries, we can fill in the payment information:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"496\" data-attachment-id=\"28613\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/attachment\/braintree_dropui_insert_form-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_insert_form.png?fit=1035%2C501&amp;ssl=1\" data-orig-size=\"1035,501\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"braintree_dropui_insert_form\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_insert_form.png?fit=1024%2C496&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_insert_form.png?resize=1024%2C496&#038;ssl=1\" alt=\"\" class=\"wp-image-28613\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_insert_form-1024x496.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_insert_form-980x474.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_dropui_insert_form-480x232.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once clicked on Buy, the system processes the transaction and, in our situation, it returns a screen with the result:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"315\" data-attachment-id=\"28615\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/attachment\/braintree_transaction_summary-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_transaction_summary.png?fit=1035%2C318&amp;ssl=1\" data-orig-size=\"1035,318\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"braintree_transaction_summary\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_transaction_summary.png?fit=1024%2C315&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_transaction_summary.png?resize=1024%2C315&#038;ssl=1\" alt=\"\" class=\"wp-image-28615\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_transaction_summary-1024x315.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_transaction_summary-980x301.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_transaction_summary-480x147.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In the detailed view, the JSON returned from the API&nbsp;<strong>CreatePurchase<\/strong>&nbsp;to the frontend application, is the type below:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\n{\n\u00a0\u00a0&quot;target&quot;: {\n\u00a0\u00a0\u00a0\u00a0&quot;id&quot;: &quot;********&quot;,\n\u00a0\u00a0\u00a0\u00a0&quot;addOns&quot;: &#x5B;],\n\u00a0\u00a0\u00a0\u00a0&quot;amount&quot;: 11.11,\n\u00a0\u00a0\u00a0\u00a0\/\/&#x5B;...]\n\u00a0\u00a0\u00a0\u00a0&quot;createdAt&quot;: &quot;2019-05-21T05:55:36Z&quot;,\n\u00a0\u00a0\u00a0\u00a0&quot;creditCard&quot;: {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;bin&quot;: &quot;411111&quot;,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;cardholderName&quot;: &quot;FirstName LastName&quot;,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;cardType&quot;: {},\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;customerLocation&quot;: {},\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;lastFour&quot;: &quot;1111&quot;,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/&#x5B;...]\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;expirationMonth&quot;: &quot;05&quot;,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;expirationYear&quot;: &quot;2025&quot;,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;imageUrl&quot;: &quot;https:\/\/assets.braintreegateway.com\/payment_method_logo\/visa.png?environment=sandbox&quot;,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;verification&quot;: null,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;expirationDate&quot;: &quot;05\/2025&quot;,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;maskedNumber&quot;: &quot;411111******1111&quot;\n\u00a0\u00a0\u00a0\u00a0},\n\u00a0\u00a0\u00a0\u00a0&quot;currencyIsoCode&quot;: &quot;EUR&quot;,\n\u00a0\u00a0\u00a0\u00a0&quot;cvvResponseCode&quot;: &quot;I&quot;,\n\u00a0\u00a0\u00a0\u00a0&quot;gatewayRejectionReason&quot;: {},\n\u00a0\u00a0\u00a0\u00a0&quot;merchantAccountId&quot;: &quot;prova&quot;,\n\u00a0\u00a0\u00a0\u00a0&quot;processorAuthorizationCode&quot;: &quot;******&quot;,\n\u00a0\u00a0\u00a0\u00a0&quot;processorResponseType&quot;: {},\n\u00a0\u00a0\u00a0\u00a0&quot;processorResponseCode&quot;: &quot;1000&quot;,\n\u00a0\u00a0\u00a0\u00a0&quot;processorResponseText&quot;: &quot;Approved&quot;,\n\u00a0\u00a0\u00a0\u00a0&quot;shippingAddress&quot;: {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/&#x5B;...]\n\u00a0\u00a0\u00a0\u00a0},\n\u00a0\u00a0\u00a0\u00a0&quot;status&quot;: {},\n\u00a0\u00a0\u00a0\u00a0&quot;statusHistory&quot;: &#x5B;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;amount&quot;: 11.11,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;status&quot;: {},\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;timestamp&quot;: &quot;2019-05-21T05:55:36Z&quot;,\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;source&quot;: {},\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&quot;user&quot;: &quot;&quot;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0},\n\u00a0\u00a0\u00a0\u00a0],\n\u00a0\u00a0\u00a0\u00a0\/\/&#x5B;...]\n\u00a0\u00a0\u00a0\u00a0},\n\u00a0\u00a0\u00a0\u00a0&quot;type&quot;: {},\n\u00a0\u00a0\u00a0\u00a0&quot;updatedAt&quot;: &quot;2019-05-21T05:55:37Z&quot;,\n\u00a0\u00a0\u00a0\u00a0\/\/&#x5B;...]\n\u00a0\u00a0\u00a0\u00a0&quot;networkTransactionId&quot;: &quot;********&quot;,\n\u00a0\u00a0\u00a0\u00a0&quot;authorizationExpiresAt&quot;: &quot;2019-05-28T05:55:36Z&quot;\n\u00a0\u00a0}\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">From the&nbsp;<strong>Braintree<\/strong>&nbsp;administration panel, we can then display the evolution of our business and some interesting statistics.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"852\" height=\"706\" data-attachment-id=\"28618\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/attachment\/braintree_admin_main_panel-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_admin_main_panel.png?fit=852%2C706&amp;ssl=1\" data-orig-size=\"852,706\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"braintree_admin_main_panel\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_admin_main_panel.png?fit=852%2C706&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_admin_main_panel.png?resize=852%2C706&#038;ssl=1\" alt=\"\" class=\"wp-image-28618\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_admin_main_panel.png 852w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/braintree_admin_main_panel-480x398.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 852px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The last step, before the passage to production, is to record as a business account to the following&nbsp;<a href=\"https:\/\/signups.braintreepayments.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">link<\/a>, obtain new credentials and substitute them in the&nbsp;<strong><em>appsettings.json<\/em><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The costs of&nbsp;<strong>Braintree<\/strong>&nbsp;business service are similar to those of&nbsp;<strong>PayPal<\/strong>&nbsp;but, if needed, it\u2019s possible to contact the support team to obtain personalized rates, based on your turnover.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The code mentioned in this article is available on GitHub, to below&nbsp;<a href=\"https:\/\/github.com\/enricobencivenga\/Braintree\" target=\"_blank\" rel=\"noreferrer noopener\">link<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">See you next<\/p>\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>How to integrate secure payments management in our store with main providers, thanks to Braintree<\/p>\n","protected":false},"author":196716247,"featured_media":28599,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"","_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","inline_featured_image":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[688637524],"tags":[688637390,688637416],"class_list":["post-28621","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-en","tag-angular-en","tag-asp-net-core-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Braintree for payments in our store - Blexin<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Braintree for payments in our store - Blexin\" \/>\n<meta property=\"og:description\" content=\"How to integrate secure payments management in our store with main providers, thanks to Braintree\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/\" \/>\n<meta property=\"og:site_name\" content=\"Blexin\" \/>\n<meta property=\"article:published_time\" content=\"2019-05-22T22:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-20T17:17:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/778137c7-6b15-41d1-9d90-0792971c3a26.png?fit=1024%2C608&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"608\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Enrico Bencivenga\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Enrico Bencivenga\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/braintree-for-payments-in-our-store\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/braintree-for-payments-in-our-store\\\/\"},\"author\":{\"name\":\"Enrico Bencivenga\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#\\\/schema\\\/person\\\/74e4443d1d7ad12d5b4a8db7f63f0194\"},\"headline\":\"Braintree for payments in our store\",\"datePublished\":\"2019-05-22T22:00:00+00:00\",\"dateModified\":\"2021-05-20T17:17:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/braintree-for-payments-in-our-store\\\/\"},\"wordCount\":825,\"image\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/braintree-for-payments-in-our-store\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/778137c7-6b15-41d1-9d90-0792971c3a26.png?fit=1024%2C608&ssl=1\",\"keywords\":[\"Angular\",\"Asp.net core\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/braintree-for-payments-in-our-store\\\/\",\"url\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/braintree-for-payments-in-our-store\\\/\",\"name\":\"Braintree for payments in our store - Blexin\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/braintree-for-payments-in-our-store\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/braintree-for-payments-in-our-store\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/778137c7-6b15-41d1-9d90-0792971c3a26.png?fit=1024%2C608&ssl=1\",\"datePublished\":\"2019-05-22T22:00:00+00:00\",\"dateModified\":\"2021-05-20T17:17:08+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#\\\/schema\\\/person\\\/74e4443d1d7ad12d5b4a8db7f63f0194\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/braintree-for-payments-in-our-store\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/braintree-for-payments-in-our-store\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/braintree-for-payments-in-our-store\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/778137c7-6b15-41d1-9d90-0792971c3a26.png?fit=1024%2C608&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/778137c7-6b15-41d1-9d90-0792971c3a26.png?fit=1024%2C608&ssl=1\",\"width\":1024,\"height\":608},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/braintree-for-payments-in-our-store\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blexin.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Braintree for payments in our store\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/blexin.com\\\/en\\\/\",\"name\":\"Blexin\",\"description\":\"Con noi \u00e8 semplice\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blexin.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#\\\/schema\\\/person\\\/74e4443d1d7ad12d5b4a8db7f63f0194\",\"name\":\"Enrico Bencivenga\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4ea7187309674789d6f02c6b757e1f21c8cf800abb2419b4edaa8b09d4c99548?s=96&d=identicon&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4ea7187309674789d6f02c6b757e1f21c8cf800abb2419b4edaa8b09d4c99548?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4ea7187309674789d6f02c6b757e1f21c8cf800abb2419b4edaa8b09d4c99548?s=96&d=identicon&r=g\",\"caption\":\"Enrico Bencivenga\"},\"url\":\"https:\\\/\\\/blexin.com\\\/en\\\/author\\\/enrico-bencivengablexin-com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Braintree for payments in our store - Blexin","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/","og_locale":"en_US","og_type":"article","og_title":"Braintree for payments in our store - Blexin","og_description":"How to integrate secure payments management in our store with main providers, thanks to Braintree","og_url":"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/","og_site_name":"Blexin","article_published_time":"2019-05-22T22:00:00+00:00","article_modified_time":"2021-05-20T17:17:08+00:00","og_image":[{"width":1024,"height":608,"url":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/778137c7-6b15-41d1-9d90-0792971c3a26.png?fit=1024%2C608&ssl=1","type":"image\/png"}],"author":"Enrico Bencivenga","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Enrico Bencivenga","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/#article","isPartOf":{"@id":"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/"},"author":{"name":"Enrico Bencivenga","@id":"https:\/\/blexin.com\/en\/#\/schema\/person\/74e4443d1d7ad12d5b4a8db7f63f0194"},"headline":"Braintree for payments in our store","datePublished":"2019-05-22T22:00:00+00:00","dateModified":"2021-05-20T17:17:08+00:00","mainEntityOfPage":{"@id":"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/"},"wordCount":825,"image":{"@id":"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/778137c7-6b15-41d1-9d90-0792971c3a26.png?fit=1024%2C608&ssl=1","keywords":["Angular","Asp.net core"],"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/","url":"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/","name":"Braintree for payments in our store - Blexin","isPartOf":{"@id":"https:\/\/blexin.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/#primaryimage"},"image":{"@id":"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/778137c7-6b15-41d1-9d90-0792971c3a26.png?fit=1024%2C608&ssl=1","datePublished":"2019-05-22T22:00:00+00:00","dateModified":"2021-05-20T17:17:08+00:00","author":{"@id":"https:\/\/blexin.com\/en\/#\/schema\/person\/74e4443d1d7ad12d5b4a8db7f63f0194"},"breadcrumb":{"@id":"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/#primaryimage","url":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/778137c7-6b15-41d1-9d90-0792971c3a26.png?fit=1024%2C608&ssl=1","contentUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/778137c7-6b15-41d1-9d90-0792971c3a26.png?fit=1024%2C608&ssl=1","width":1024,"height":608},{"@type":"BreadcrumbList","@id":"https:\/\/blexin.com\/en\/blog-en\/braintree-for-payments-in-our-store\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blexin.com\/en\/"},{"@type":"ListItem","position":2,"name":"Braintree for payments in our store"}]},{"@type":"WebSite","@id":"https:\/\/blexin.com\/en\/#website","url":"https:\/\/blexin.com\/en\/","name":"Blexin","description":"Con noi \u00e8 semplice","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blexin.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blexin.com\/en\/#\/schema\/person\/74e4443d1d7ad12d5b4a8db7f63f0194","name":"Enrico Bencivenga","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4ea7187309674789d6f02c6b757e1f21c8cf800abb2419b4edaa8b09d4c99548?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4ea7187309674789d6f02c6b757e1f21c8cf800abb2419b4edaa8b09d4c99548?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4ea7187309674789d6f02c6b757e1f21c8cf800abb2419b4edaa8b09d4c99548?s=96&d=identicon&r=g","caption":"Enrico Bencivenga"},"url":"https:\/\/blexin.com\/en\/author\/enrico-bencivengablexin-com\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/778137c7-6b15-41d1-9d90-0792971c3a26.png?fit=1024%2C608&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pcyUBx-7rD","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/28621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/users\/196716247"}],"replies":[{"embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/comments?post=28621"}],"version-history":[{"count":6,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/28621\/revisions"}],"predecessor-version":[{"id":31989,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/28621\/revisions\/31989"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/media\/28599"}],"wp:attachment":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/media?parent=28621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/categories?post=28621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/tags?post=28621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}