Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 5 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
4 com/entity/OrderPayment.cfc
@@ -120,7 +120,7 @@ component displayname="Order Payment" entityname="SlatwallOrderPayment" table="S
case "creditCard" :
variables.amountReceived = getAmountCharged() - getAmountCredited();
-
+ break;
default :
variables.amountReceived = getAmount();
}
@@ -137,7 +137,7 @@ component displayname="Order Payment" entityname="SlatwallOrderPayment" table="S
for(var i=1; i<=arrayLen(getCreditCardTransactions()); i++) {
variables.amountAuthorized += getCreditCardTransactions()[i].getAmountAuthorized();
}
-
+ break;
default :
variables.amountAuthorized = getAmount();
}
View
5 com/service/OrderService.cfc
@@ -611,8 +611,11 @@ component extends="BaseService" persistent="false" accessors="true" output="fals
for(var orderFulfillment in order.getOrderFulfillments()) {
if(orderFulfillment.getFulfillmentMethodType() == "shipping") {
if(!isNull(orderFulfillment.getAccountAddress())) {
- orderFulfillment.setShippingAddress( orderFulfillment.getAccountAddress().getAddress().copyAddress() );
+ var shippingAddress = orderFulfillment.getAccountAddress().getAddress().copyAddress();
+ orderFulfillment.setShippingAddress( shippingAddress );
orderFulfillment.removeAccountAddress();
+ // since copy address creates a new address, call save for persistence
+ getAddressService().saveAddress(shippingAddress);
getDAO().save(orderFulfillment);
}
}
View
6 com/service/TaxService.cfc
@@ -45,7 +45,7 @@ component extends="BaseService" persistent="false" accessors="true" output="fals
var orderItem = arguments.order.getOrderItems()[i];
// Remove all existing tax calculations
- for(var ta=1; ta<=arrayLen(orderItem.getAppliedTaxes()); ta++) {
+ for(var ta=arrayLen(orderItem.getAppliedTaxes()); ta >= 1; ta--) {
orderItem.getAppliedTaxes()[ta].removeOrderItem();
}
@@ -65,7 +65,7 @@ component extends="BaseService" persistent="false" accessors="true" output="fals
for(var r=1; r<= arrayLen(taxCategory.getTaxCategoryRates()); r++) {
if(isNull(taxCategory.getTaxCategoryRates()[r].getAddressZone()) || getAddressService().isAddressInZone(address=address, addressZone=taxCategory.getTaxCategoryRates()[r].getAddressZone())) {
var newAppliedTax = this.newOrderItemAppliedTax();
- newAppliedTax.setTaxAmount(numberFormat(orderItem.getExtendedPriceAfterDiscount() * (taxCategory.getTaxCategoryRates()[r].getTaxRate() / 100),".00"));
+ newAppliedTax.setTaxAmount(round(orderItem.getExtendedPriceAfterDiscount() * taxCategory.getTaxCategoryRates()[r].getTaxRate()) / 100);
newAppliedTax.setTaxRate(taxCategory.getTaxCategoryRates()[r].getTaxRate());
newAppliedTax.setTaxCategoryRate(taxCategory.getTaxCategoryRates()[r]);
newAppliedTax.setOrderItem(orderItem);
@@ -79,7 +79,7 @@ component extends="BaseService" persistent="false" accessors="true" output="fals
var originalAppliedTaxes = orderItem.getReferencedOrderItem().getAppliedTaxes();
for(var i=1; i<=arrayLen(originalAppliedTaxes); i++) {
var newAppliedTax = this.newOrderItemAppliedTax();
- newAppliedTax.setTaxAmount(numberFormat(orderItem.getExtendedPriceAfterDiscount() * (originalAppliedTaxes[i].getTaxRate() / 100),".00"));
+ newAppliedTax.setTaxAmount(round(orderItem.getExtendedPriceAfterDiscount() * originalAppliedTaxes[i].getTaxRate()) / 100);
newAppliedTax.setTaxRate( originalAppliedTaxes[i].getTaxRate() );
newAppliedTax.setTaxCategoryRate( originalAppliedTaxes[i].getTaxCategoryRate() );
newAppliedTax.setOrderItem( orderItem );
View
23 integrationServices/payflowpro/Payment.cfc
@@ -39,13 +39,6 @@ Notes:
component accessors="true" output="false" displayname="PayFlowPro" implements="Slatwall.integrationServices.PaymentInterface" extends="Slatwall.integrationServices.BasePayment" {
- // Custom Properties that need to be set by the end user
- property name="vendorID" displayname="Vendor ID (Merchant ID)" type="string";
- property name="partnerID" displayname="Partner ID (leave blank if no partner)" type="string";
- property name="username" displayname="Username" type="string";
- property name="password" displayname="Password" type="string" fieldType="password";
- property name="liveModeFlag" displayname="Live Mode" type="boolean";
-
//Global variables
variables.liveGatewayAddress = "payflowpro.paypal.com";
variables.testGatewayAddress = "pilot-payflowpro.paypal.com";
@@ -55,12 +48,6 @@ component accessors="true" output="false" displayname="PayFlowPro" implements="S
public any function init(){
// Set Defaults
- setPartnerID("");
- setVendorID("");
- setUsername("");
- setPassword("");
- setLiveModeFlag(false);
-
variables.transactionCodes = {
authorize="A",
authorizeAndCharge="S",
@@ -98,10 +85,10 @@ component accessors="true" output="false" displayname="PayFlowPro" implements="S
private string function getLoginNVP(){
var loginData = [];
- arrayAppend(loginData,"USER=#getUserName()#");
- arrayAppend(loginData,"PARTNER=#getPartnerID()#");
- arrayAppend(loginData,"VENDOR=#getVendorID()#");
- arrayAppend(loginData,"PWD=#getPassword()#");
+ arrayAppend(loginData,"USER=#setting('userName')#");
+ arrayAppend(loginData,"PARTNER=#setting('partnerID')#");
+ arrayAppend(loginData,"VENDOR=#setting('vendorID')#");
+ arrayAppend(loginData,"PWD=#setting('password')#");
return arrayToList(loginData,"&");
}
@@ -158,7 +145,7 @@ component accessors="true" output="false" displayname="PayFlowPro" implements="S
}
private string function getGatewayAddress(){
- if(getLiveModeFlag()){
+ if(setting('liveModeFlag')){
return variables.liveGatewayAddress;
} else {
return variables.testGatewayAddress;
View
2 tags/SlatwallShippingMethodDisplay.cfm
@@ -53,7 +53,7 @@ Notes:
</cfif>
<cfloop array="#local.methodOptions#" index="option">
<cfset local.optionSelected = false />
- <cfif !isNull(attributes.orderFulfillmentShipping.getShippingMethod()) and attributes.orderFulfillmentShipping.getShippingMethod().getShippingMethodID() eq option.getShippingMethod().getShippingMethodID()>
+ <cfif !isNull(attributes.orderFulfillmentShipping.getShippingMethod()) and attributes.orderFulfillmentShipping.getShippingMethod().getShippingMethodID() eq option.getShippingMethodRate().getShippingMethod().getShippingMethodID()>
<cfset local.optionSelected = true />
<cfelseif local.noneSelected>
<cfset local.noneSelected = false />

No commit comments for this range

Something went wrong with that request. Please try again.