-
Notifications
You must be signed in to change notification settings - Fork 0
/
148cd156.0921a354.js
1 lines (1 loc) · 10.2 KB
/
148cd156.0921a354.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{112:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return u})),n.d(t,"metadata",(function(){return b})),n.d(t,"rightToc",(function(){return d})),n.d(t,"default",(function(){return f}));var a,r=n(2),o=n(6),c=(n(0),n(250)),i=n(252),l=n(257),s=n(258),u={id:"PlaygroundOutros",title:"Playground Outros",hide_title:!0,sidebar_label:"Playground Others"},b={id:"AmbienteTestes/PlaygroundOutros",isDocsHomePage:!1,title:"Playground Outros",description:"Playground: Others",source:"@site/docs\\AmbienteTestes\\PlaygroundOutros.md",permalink:"/documentation/docs/AmbienteTestes/PlaygroundOutros",sidebar_label:"Playground Others",sidebar:"someSidebar",previous:{title:"Playground Assinaturas",permalink:"/documentation/docs/AmbienteTestes/PlaygroundAssinaturas"},next:{title:"Introdu\xe7\xe3o",permalink:"/documentation/docs/Instalacao/introducao"}},d=[{value:'<Highlight color="#00BBCE">GET</Highlight> /v1/installments',id:"get-v1installments",children:[]}],m=(a="Highlight",function(e){return console.warn("Component "+a+" was not imported, exported, or provided by MDXProvider as global scope"),Object(c.b)("div",e)}),p={rightToc:d};function f(e){var t=e.components,n=Object(o.a)(e,["components"]);return Object(c.b)("wrapper",Object(r.a)({},p,n,{components:t,mdxType:"MDXLayout"}),Object(c.b)("h1",{className:"titulo"},"Playground: Others"),Object(c.b)("div",{className:"subtitulo"},Object(c.b)("p",null,"To acess the sandbox environmet you will need a Gerencianet account. ",Object(c.b)("a",{href:"https://gerencianet.com.br/#abrirconta",title:"Cadastro ao nosso sistema, seja nosso cliente",target:"_blank"},"Create your account"),"."),Object(c.b)("p",null,'The Playground (also called as "sandbox") it is a development/test environment in which the integrator, regardless of the operation to be performed, can use to learn about the payment mechanism and flow in a 100% test and uncomplicated environment. Know more about the Gerencianet\'s sandbox environment.'),Object(c.b)("p",null,"The endpoint ",Object(c.b)("code",null,"installment")," is used to list the installments of each credit card brand, with the interest amounts and number of installments calculated according to the integrating account. That is, if your account has a card interest setting (option available for customers who have chosen to receive card amounts in installments), it is not necessary to make any calculations, this ",Object(c.b)("em",{parentName:"p"},"endpoint")," already informs the calculated amounts. "),Object(c.b)("p",null,"In the PHP SDK, for example, the function that uses this endpoint is called ",Object(c.b)("code",null,"getInstallments"),", and a ",Object(c.b)("a",{href:"https://github.com/gerencianet/gn-api-sdk-php/blob/master/examples/extra/getInstallments.php",target:"_blank"},"example")," can be seen in our documentation."),Object(c.b)("p",null,"Other details about listing credit card installments, ",Object(c.b)("a",{href:"../PagamentoCartao/EndpointsCartao#5-listar-parcelas-de-acordo-com-a-bandeira-do-cart\xe3o-de-cr\xe9dito"},"acess the specific section ")," in our documentation."),Object(c.b)("p",null,'Next, check the endpoint present in our Playground, within the "Others": '),Object(c.b)("br",null),Object(c.b)("hr",null),Object(c.b)("h3",{id:"get-v1installments"},Object(c.b)(m,{color:"#00BBCE",mdxType:"Highlight"},"GET")," /v1/installments"),Object(c.b)("p",null,"Allows you to list the installments, according to the credit card brand, with the interest amounts and number of installments calculated according to the fees/tax of the integrating account. "),Object(c.b)("p",null,"Available credit card's brands: ",Object(c.b)("code",null,"visa"),", ",Object(c.b)("code",null,"mastercard"),", ",Object(c.b)("code",null,"amex"),", ",Object(c.b)("code",null,"elo")," and ",Object(c.b)("code",null,"hipercard"),"."),Object(c.b)("p",null,"In the following image, you can see the screen of our test environment, which contains the resources linked to the ",Object(c.b)("code",null,"GET /v1/installments")," method that are available for use: "),Object(c.b)("a",{href:Object(i.a)("img/balance.png"),target:"_blank"},Object(c.b)("img",{src:Object(i.a)("img/balance.png")})),Object(c.b)("p",null,"The following is a simple JSON that allows you to list the installments when paying by credit card. Also, you can look at the predicted output available for this method. Remembering that it is also necessary to inform the input parameter ",Object(c.b)("inlineCode",{parentName:"p"},"brand")," (credit card's brand) and ",Object(c.b)("inlineCode",{parentName:"p"},"total")," (total amount) of the purchase you want to obtain the information: "),Object(c.b)(l.a,{defaultValue:"entrada",values:[{label:"Dados de Entrada",value:"entrada"},{label:"Dados de Sa\xedda",value:"saida"}],mdxType:"Tabs"},Object(c.b)(s.a,{value:"entrada",mdxType:"TabItem"},Object(c.b)("pre",null,Object(c.b)("code",Object(r.a)({parentName:"pre"},{}),' Input parameter: enter the "brand" and "total" \n'))),Object(c.b)(s.a,{value:"saida",mdxType:"TabItem"},Object(c.b)("pre",null,Object(c.b)("code",Object(r.a)({parentName:"pre"},{className:"language-json"}),'{\n "code": 200, // retorno HTTP "200" informando que o pedido foi bem sucedido\n "data": {\n "rate": 0,\n "name": "visa", // bandeira do cart\xe3o informada\n "installments": [\n {\n "installment": 1,\n "has_interest": false,\n "value": 1000, // valor da primeira parcela\n "currency": "10,00",\n "interest_percentage": 0\n },\n {\n "installment": 2,\n "has_interest": true,\n "value": 515, // valor da segunda parcela\n "currency": "5,15",\n "interest_percentage": 199\n }\n ]\n }\n}\n'))))))}f.isMDXComponent=!0},250:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return p}));var a=n(0),r=n.n(a);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=r.a.createContext({}),u=function(e){var t=r.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},b=function(e){var t=u(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=r.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),b=u(n),m=a,p=b["".concat(c,".").concat(m)]||b[m]||d[m]||o;return n?r.a.createElement(p,i(i({ref:t},s),{},{components:n})):r.a.createElement(p,i({ref:t},s))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,c=new Array(o);c[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:a,c[1]=i;for(var s=2;s<o;s++)c[s]=n[s];return r.a.createElement.apply(null,c)}return r.a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},251:function(e,t,n){"use strict";var a=n(0),r=n(35);t.a=function(){return Object(a.useContext)(r.a)}},252:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(251),r=n(253);function o(e,{forcePrependBaseUrl:t=!1,absolute:n=!1}={}){const{siteConfig:{baseUrl:o="/",url:c}={}}=Object(a.a)();if(!e)return e;if(t)return o+e;if(!Object(r.a)(e))return e;const i=o+e.replace(/^\//,"");return n?c+i:i}},253:function(e,t,n){"use strict";function a(e){return!1===/^(https?:|\/\/|mailto:|tel:)/.test(e)}n.d(t,"a",(function(){return a}))},254:function(e,t,n){"use strict";function a(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=a(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}t.a=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=a(e))&&(r&&(r+=" "),r+=t);return r}},255:function(e,t,n){"use strict";var a=n(0);const r=Object(a.createContext)({tabGroupChoices:{},setTabGroupChoices:()=>{},isAnnouncementBarClosed:!1,closeAnnouncementBar:()=>{}});t.a=r},256:function(e,t,n){"use strict";var a=n(0),r=n(255);t.a=function(){return Object(a.useContext)(r.a)}},257:function(e,t,n){"use strict";var a=n(0),r=n.n(a),o=n(256),c=n(254),i=n(92),l=n.n(i);const s=37,u=39;t.a=function(e){const{block:t,children:n,defaultValue:i,values:b,groupId:d}=e,{tabGroupChoices:m,setTabGroupChoices:p}=Object(o.a)(),[f,h]=Object(a.useState)(i);if(null!=d){const e=m[d];null!=e&&e!==f&&b.some(t=>t.value===e)&&h(e)}const O=e=>{h(e),null!=d&&p(d,e)},g=[];return r.a.createElement("div",null,r.a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:Object(c.a)("tabs",{"tabs--block":t})},b.map(({value:e,label:t})=>r.a.createElement("li",{role:"tab",tabIndex:"0","aria-selected":f===e,className:Object(c.a)("tabs__item",l.a.tabItem,{"tabs__item--active":f===e}),key:e,ref:e=>g.push(e),onKeyDown:e=>((e,t,n)=>{switch(n.keyCode){case u:((e,t)=>{const n=e.indexOf(t)+1;e[n]?e[n].focus():e[0].focus()})(e,t);break;case s:((e,t)=>{const n=e.indexOf(t)-1;e[n]?e[n].focus():e[e.length-1].focus()})(e,t)}})(g,e.target,e),onFocus:()=>O(e),onClick:()=>O(e)},t))),r.a.createElement("div",{role:"tabpanel",className:"margin-vert--md"},a.Children.toArray(n).filter(e=>e.props.value===f)[0]))}},258:function(e,t,n){"use strict";var a=n(0),r=n.n(a);t.a=function(e){return r.a.createElement("div",null,e.children)}}}]);