Skip to content

Commit

Permalink
Merge pull request #58 from Adyen/develop
Browse files Browse the repository at this point in the history
Merge for release 18.1.0
  • Loading branch information
rikterbeek authored Apr 13, 2018
2 parents 75abbdf + cca0803 commit 68ba759
Show file tree
Hide file tree
Showing 14 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
.idea
/.DS_Store
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function verify (args) {
adyenRequest.put("billingAddress.country", billingAddr.countryCode.toString().toUpperCase() );
adyenRequest.put("billingAddress.houseNumberOrName", (!empty(args.houseNumber)) ? args.houseNumber : 'NA' );
adyenRequest.put("billingAddress.postalCode", billingAddr.postalCode );
adyenRequest.put("billingAddress.stateOrProvince", (!empty(billingAddr.stateCode)) ? billingAddr.stateCode : 'NA' );
adyenRequest.put("billingAddress.stateOrProvince", (!empty(billingAddr.stateCode) ? billingAddr.stateCode : 'NA') );
adyenRequest.put("billingAddress.street", billingAddr.address1 );
adyenRequest.put("billingAddressType", '1' );

Expand All @@ -237,7 +237,7 @@ function verify (args) {

adyenRequest.put("deliveryAddress.houseNumberOrName", (!empty(args.houseNumber)) ? args.houseNumber : 'NA' );
adyenRequest.put("deliveryAddress.postalCode", shippingAddr.postalCode );
adyenRequest.put("deliveryAddress.stateOrProvince", (!empty(shippingAddr.stateCode)) ? shippingAddr.stateCode : 'NA' );
adyenRequest.put("deliveryAddress.stateOrProvince",(!empty( shippingAddr.stateCode) ? shippingAddr.stateCode : 'NA') );
adyenRequest.put("deliveryAddress.street", shippingAddr.address1 );
adyenRequest.put("deliveryAddressType", '1' );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ function getMethods (basket : dw.order.Basket, CountryCode) {
return PIPELET_ERROR;
}

var currencyCode: String = basket.currencyCode;
var currencyCode: String = basket.currencyCode;
var merchantReference: String = "Request payment methods";
var paymentAmount: Number = basket.getTotalGrossPrice() ? basket.getTotalGrossPrice().getValue() * 100 : 1000;
var paymentAmount: Number = basket.getTotalGrossPrice() ? AdyenHelper.getCurrencyValueForApi(basket.getTotalGrossPrice()) : 1000;
//Get country code based on Shipping Address and if it changes on the billing address then the payment methods need to be refreshed
var shippingAddr : Shipment = basket.defaultShipment.shippingAddress;
var countryCode = !empty(CountryCode) ? CountryCode.toUpperCase() : shippingAddr.countryCode.value.toUpperCase();
Expand All @@ -64,7 +64,7 @@ function getMethods (basket : dw.order.Basket, CountryCode) {
shipBeforeDate = shipBeforeDate.toISOString();

var adyenRequest: SortedMap = new SortedMap();
adyenRequest.put("paymentAmount", paymentAmount);
adyenRequest.put("paymentAmount", paymentAmount.toFixed(0));
adyenRequest.put("currencyCode", currencyCode);
adyenRequest.put("merchantReference", merchantReference);
adyenRequest.put("skinCode", skinCode);
Expand Down
3 changes: 1 addition & 2 deletions cartridges/int_adyen/cartridge/scripts/handleNotify.ds
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ function notify (hpm) {
customObj.custom.currency = hpm.currency.stringValue;
customObj.custom.eventCode = hpm.eventCode.stringValue;

//var timeString : String = StringUtils.formatCalendar(calObj, "yyyy-MM-dd'T'hh:mm:ss.sssZ");
var timeString : String = StringUtils.formatCalendar(calObj, "YYYY-MM-DD'T'HH:mm:ss.sssZ");
var timeString : String = StringUtils.formatCalendar(calObj, "yyyy-MM-dd'T'hh:mm:ss.sssZ");
customObj.custom.eventDate = timeString;
customObj.custom.httpRemoteAddress = request.httpRemoteAddress;
customObj.custom.live = hpm.live.stringValue;
Expand Down
Binary file removed documentation/Adyen Integration Guide-v17.1.0.pdf
Binary file not shown.
Binary file added documentation/Adyen Integration Guide-v18.1.0.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
</attribute-definition>
<attribute-definition attribute-id="Adyen_Open_Invoice_Whitelist">
<display-name xml:lang="x-default">Open Invoice White List Methods</display-name>
<description xml:lang="x-default">CSV (e.g. klarna, payrate and/or afterpay)</description>
<description xml:lang="x-default">csv formatted string e.g. klarna,ratepay,afterpay_default,afterpay_directdebit</description>
<type>string</type>
<mandatory-flag>false</mandatory-flag>
<externally-managed-flag>false</externally-managed-flag>
Expand Down
File renamed without changes.
Binary file added metadata/site_import/sites/.DS_Store
Binary file not shown.
File renamed without changes.

0 comments on commit 68ba759

Please sign in to comment.