add payment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

add payment

jjmbconquista
i
am trying add a payment for order, the data are entered in the database
correctly, but when I find the Order shows no payment associated with
it. I get the message in screen:
 
Payment Information
No payment preferences associated with this order

I use the following code to insert the Payment:

 Map
paymentContext = UtilMisc.toMap("paymentMethodTypeId", "CREDIT_CARD",
"statusId", "PAYMENT_NOT_AUTH", "currencyUomId", orh.getCurrency(),
"userLogin", userLogin);
            paymentContext.put("paymentTypeId", "CUSTOMER_PAYMENT");
            paymentContext.put("amount", new Double(199.0));
            paymentContext.put("partyIdTo",
 billToParty.get("partyId"));
            paymentContext.put("partyIdFrom", billFromParty.get("partyId"));
            Debug.logInfo("Creating paymentRelease...", module);
            Map createPaymentResult = dispatcher.runSync("createPayment", paymentContext);
           
        
   
        Map results =
dispatcher.runSync("createOrderPaymentPreference",
UtilMisc.toMap("userLogin", userLogin, "orderId",
orderHeader.getString("orderId"), "paymentMethodTypeId", "CREDIT_CARD",
"paymentMethodId", "COVISA", "maxAmount",
org.opentaps.common.util.UtilCommon.asBigDecimal("199.0")));

someone could give me a hint?



      Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua cara @ymail.com ou @rocketmail.com.
http://br.new.mail.yahoo.com/addresses
Reply | Threaded
Open this post in threaded view
|

Re: add payment

jjmbconquista
someone knows how to add a payment? Someone have some tutorial?

jjmbconquista wrote
i
am trying add a payment for order, the data are entered in the database
correctly, but when I find the Order shows no payment associated with
it. I get the message in screen:
 
Payment Information
No payment preferences associated with this order

I use the following code to insert the Payment:

 Map
paymentContext = UtilMisc.toMap("paymentMethodTypeId", "CREDIT_CARD",
"statusId", "PAYMENT_NOT_AUTH", "currencyUomId", orh.getCurrency(),
"userLogin", userLogin);
            paymentContext.put("paymentTypeId", "CUSTOMER_PAYMENT");
            paymentContext.put("amount", new Double(199.0));
            paymentContext.put("partyIdTo",
 billToParty.get("partyId"));
            paymentContext.put("partyIdFrom", billFromParty.get("partyId"));
            Debug.logInfo("Creating paymentRelease...", module);
            Map createPaymentResult = dispatcher.runSync("createPayment", paymentContext);
           
        
   
        Map results =
dispatcher.runSync("createOrderPaymentPreference",
UtilMisc.toMap("userLogin", userLogin, "orderId",
orderHeader.getString("orderId"), "paymentMethodTypeId", "CREDIT_CARD",
"paymentMethodId", "COVISA", "maxAmount",
org.opentaps.common.util.UtilCommon.asBigDecimal("199.0")));

someone could give me a hint?



      Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua cara @ymail.com ou @rocketmail.com.
http://br.new.mail.yahoo.com/addresses