commit
c81da8900a
@ -0,0 +1,27 @@
|
|||||||
|
<div class="modal-header">Manual Settlements</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<table class="table table-striped table-bordered table-hover" ng-if="customizedLogs.length">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Merchant</th>
|
||||||
|
<th>Amount</th>
|
||||||
|
<th>Operation</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr ng-repeat="log in customizedLogs">
|
||||||
|
<td ng-bind="log.client_moniker"></td>
|
||||||
|
<td ng-bind="log.amount|currency:''"></td>
|
||||||
|
<td>
|
||||||
|
<a title="Download" ng-href="{{log.aba_file}}" target="_blank"><i class="fa fa-download"></i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div ng-if="!customizedLogs.length">
|
||||||
|
No manual settlements today
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-danger" ng-click="$dismiss()">OK</button>
|
||||||
|
</div>
|
@ -0,0 +1,25 @@
|
|||||||
|
package au.com.royalpay.payment.manage.shopify.support;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.web.util.UriComponentsBuilder;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
class HmacVerificationUtilTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void checkParameters() {
|
||||||
|
String message = "host=Z2Vlay10ZXN0LXNob3AubXlzaG9waWZ5LmNvbS9hZG1pbg&shop=geek-test-shop.myshopify.com×tamp=1648025715";
|
||||||
|
String key = "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";
|
||||||
|
String hmac = "803cd4924b19cedc5361ab09776d078a18be3ba32fd7d62de72269a12bec1ffc";
|
||||||
|
assert HmacVerificationUtil.hmacSHA256(message, key, hmac);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testQuery() {
|
||||||
|
String base = "host=Z2Vlay10ZXN0LXNob3AubXlzaG9waWZ5LmNvbS9hZG1pbg×tamp=1648025715&shop=geek-test-shop.myshopify.com";
|
||||||
|
String query = UriComponentsBuilder.fromUriString("/shopify/auth?hmac=803cd4924b19cedc5361ab09776d078a18be3ba32fd7d62de72269a12bec1ffc&host=Z2Vlay10ZXN0LXNob3AubXlzaG9waWZ5LmNvbS9hZG1pbg×tamp=1648025715&shop=geek-test-shop.myshopify.com")
|
||||||
|
.replaceQueryParam("hmac").build().getQuery();
|
||||||
|
assertEquals(base, query);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue