<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="63156" data-post-id="63156">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hassan" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hassan/120/287_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hassan
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<blockquote>
<p>…the 6 that have 3 decimal places and the one that has 4 decimal places.</p>
<p>I had no idea such currencies exist</p>
</blockquote>
<p>And obviously neither does anyone proposing to deal with money by<br>
reducing all amounts to integers <img src="https://forum.elixirforum.com/images/emoji/apple/grinning_face.png?v=15" title=":grinning_face:" class="emoji" alt=":grinning_face:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="63156" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/gringotts-a-complete-payment-library-for-elixir-and-phoenix-framework/11054/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-63156" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="63156"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="63160" data-post-id="63160">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="AstonJ" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/AstonJ/120/15_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  AstonJ
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="hassan" data-post="12" data-topic="11054">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hassan/48/287_2.png" class="avatar"> hassan:</div>
<blockquote>
<p>And obviously neither does anyone proposing to deal with money by<br>
reducing all amounts to integers <img src="https://forum.elixirforum.com/images/emoji/apple/grinning.png?v=15" title=":grinning:" class="emoji" alt=":grinning:" loading="lazy" width="20" height="20"></p>
</blockquote>
</aside>
<p>Using integers is perfectly fine for most currencies when decimal isn’t an option - at least from everything I’ve read about it.</p>
<p>What would you suggest if decimal wasn’t an option?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="63160" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/gringotts-a-complete-payment-library-for-elixir-and-phoenix-framework/11054/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-63160" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="63160"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="63162" data-post-id="63162">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sztosz" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sztosz/120/1251_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sztosz
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="hassan" data-post="12" data-topic="11054">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hassan/48/287_2.png" class="avatar"> hassan:</div>
<blockquote>
<p>And obviously neither does anyone proposing to deal with money by<br>
reducing all amounts to integers <img src="https://forum.elixirforum.com/images/emoji/apple/grinning.png?v=15" title=":grinning:" class="emoji" alt=":grinning:" loading="lazy" width="20" height="20"></p>
</blockquote>
</aside>
<p>No I didn’t <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> But I think that every currency has to by strongly typed, and have not only it’s value but also a mean to distinguish it from other currencies, so the conversion from the internal representation i.e. integers to an external representation does really rely on its type (is it US Dollar, Libyan dinar, Chilean unit of account, or rather something even more exotic for the majority of library users). Representing value internally by decimal type, can lead to nasty undesirable state, like having a 1.005 value for currencies that does not have 3rd digit in fractions. On the other hand we wouldn’t want automatic rounding…</p>
<p>Counting money is hard, maybe not as hard as dealing with time, but still…</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="63162" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/gringotts-a-complete-payment-library-for-elixir-and-phoenix-framework/11054/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-63162" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="63162"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="63170" data-post-id="63170">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hassan" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hassan/120/287_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hassan
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<blockquote>
<p>Using integers is perfectly fine for most currencies when decimal isn’t an<br>
option - at least from everything I’ve read about it.</p>
</blockquote>
<p>Not in my opinion – you will <em>always</em> have to deal with fractional<br>
values and rounding at some point.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="63170" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/gringotts-a-complete-payment-library-for-elixir-and-phoenix-framework/11054/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-63170" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="63170"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="63176" data-post-id="63176">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kip" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kip/120/1440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kip
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>ex_cldr Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I believe that when dealing with money it’s important to</p>
<ol>
<li>
<p>Always have a currency associated with any amount.  Assumptions lead to issues including but not limited to rounding and arithmetic.  Indeed some currencies round differently for cash values versus accounting values (for example the Australian dollar has a minimum 5c unit for cash and 1c for accounting/electronic transactions).</p>
</li>
<li>
<p>The value needs to be either a Decimal (fixed point) or an integer plus an exponent (which is how the Decimal lib works anyway).</p>
</li>
</ol>
<p>In Postgres you can represent these opinions with a composite type (which is what I do in <a href="https://hex.pm/packages/ex_money" class="inline-onebox" rel="nofollow">ex_money | Hex</a>) which Ecto supports out-of-the-box.  For MySql its a bit trickier and I use a json field with the decimal amount serialised as a string value to preserve precision.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="63176" data-batch-url="/posts/batch_likers">
                        6
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/gringotts-a-complete-payment-library-for-elixir-and-phoenix-framework/11054/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-63176" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="63176"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="63178" data-post-id="63178">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="AstonJ" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/AstonJ/120/15_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  AstonJ
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks for the replies all… I’m glad I only had to think about pound sterling when I was working on an app that dealt with money (we used decimal) <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="63178" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/gringotts-a-complete-payment-library-for-elixir-and-phoenix-framework/11054/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-63178" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="63178"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="63180" data-post-id="63180">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="pkrawat1" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/pkrawat1/120/7503_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  pkrawat1
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yeah, we were looking for such library, but could not found one. So thought to give it a try. Thanks to the team effort we reached this stage.</p>
<p>Floats: - Oh that was really a great remark, Thanks. we can use some thing like money, ex_money and monetized suggested by kip , that are using decimal as the amount.</p>
<p>we are also thinking about adding a cryptocurrency gateway here. Then decimal would be the ideal solution for it. Will think about this.</p>
<p>Genserver: - We are still thinking about, giving the control to the end user or keeping the control to us, in relation to handling multiple requests like subscriptions in workers. Not sure right now. Since we are focusing on adding minimal gateways(6) first. So this time would be great to think about the supervision tree incase it is required or not, or just modules and functions will do.</p>
<p>Since the project is just some weeks old. Things/thoughts will come. Wanted to share it with you guys. Suggestions like these are the way to make a great library.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="63180" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/gringotts-a-complete-payment-library-for-elixir-and-phoenix-framework/11054/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-63180" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="63180"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="63181" data-post-id="63181">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="pkrawat1" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/pkrawat1/120/7503_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  pkrawat1
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks for the suggestion. We really need an abstraction here for money types.<br>
Awesome, you are the author of ex_money.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="63181" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/gringotts-a-complete-payment-library-for-elixir-and-phoenix-framework/11054/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-63181" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="63181"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="63182" data-post-id="63182">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="pkrawat1" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/pkrawat1/120/7503_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  pkrawat1
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="James-Byrne" data-post="6" data-topic="11054" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/james-byrne/48/16061_2.png" class="avatar"> James-Byrne:</div>
<blockquote>
<p>What parts of the payment gateways are you targeting? Is it just plain payments or are you attempting to support Hosted Payment Pages, subscriptions, refunds, betting? Do you have a list of gateways your looking to support or some kind of roadmap?</p>
</blockquote>
</aside>
<p>we are thinking of adding support for subscription and refunds too. Looking for community response regarding this.<br>
we will be adding a road map on readme. Currently we are following Active Merchant strategy and gateways it provides.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="63182" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/gringotts-a-complete-payment-library-for-elixir-and-phoenix-framework/11054/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-63182" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="63182"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #19"></div>
  </section>
</div>
    <div class="postbit" id="63183" data-post-id="63183">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="pkrawat1" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/pkrawat1/120/7503_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  pkrawat1
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I had worked on a fin-tech project for mutual funds, stocks, bonds etc. Even decimals were giving us nightmares, as digits at 9 decimal places were important. And ruby was not doing it correctly at those decimal places, or may be we were missing something. But we had to fix the decimal places later in the end .</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="63183" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/gringotts-a-complete-payment-library-for-elixir-and-phoenix-framework/11054/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-63183" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="63183"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #20"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/11054/load_more?page=3">Load more posts (31 remaining)</a>
</div></template></turbo-stream>