MoneyBooker payment Gateway

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 yıl önce
Hi Folks,

In my website, I'm using moneybooker payment gateway, the problem is return to Merchant link does not work.
Any clue regarding this issue?

Best regards,
Mohammed Ebaid.
14 yıl önce
If you log into administration and go to System > Log can you post the details of the error.
14 yıl önce
mebaid01 wrote:
Hi Folks,

In my website, I'm using moneybooker payment gateway, the problem is return to Merchant link does not work.
Any clue regarding this issue?

Best regards,
Mohammed Ebaid.


Yes, same thing for me !
14 yıl önce
If you log into administration and go to System > Log can you post the details of the error.
14 yıl önce
nopCommerce team | a.m. wrote:
If you log into administration and go to System > Log can you post the details of the error.


No any log for moneybookers order.



---------------------------------------------------------------------------
14 yıl önce
I have referred to the Manual of Moneybookers :

If this field "return_url" is not filled, the gateway window will simply close automatically at the end of the transaction

--------------------------------------------------------------------------------------------------

I check MoneybookersPaymentProcessor.cs in Nop.Payment.Moneybookers :


        public string PostProcessPayment(Order order)
        {
            RemotePost remotePostHelper = new RemotePost();
            remotePostHelper.FormName = "MoneybookersForm";
            remotePostHelper.Url = GetMoneybookersUrl();

            remotePostHelper.Add("pay_to_email", payToEmail);
            remotePostHelper.Add("recipient_description", SettingManager.StoreName);
            remotePostHelper.Add("transaction_id", order.OrderID.ToString());
            remotePostHelper.Add("cancel_url", CommonHelper.GetStoreLocation(false) + "Default.aspx");
            remotePostHelper.Add("status_url", CommonHelper.GetStoreLocation(false) + "MoneybookersReturn.aspx");
            //supported moneybookers languages (EN, DE, ES, FR, IT, PL, GR, RO, RU, TR, CN, CZ or NL)
            //TODO Check if customer working language is supported by Moneybookers.
            remotePostHelper.Add("language", "EN");
            remotePostHelper.Add("amount", order.OrderTotal.ToString(new CultureInfo("en-US", false).NumberFormat));
            //TODO Primary store currency should be set to USD now (3-letter codes)
            remotePostHelper.Add("currency", CurrencyManager.PrimaryStoreCurrency.CurrencyCode);
            remotePostHelper.Add("detail1_description", "Order ID:");
            remotePostHelper.Add("detail1_text", order.OrderID.ToString());

            remotePostHelper.Add("firstname", order.BillingFirstName);
            remotePostHelper.Add("lastname", order.BillingLastName);
            remotePostHelper.Add("address", order.BillingAddress1);
            remotePostHelper.Add("phone_number", order.BillingPhoneNumber);
            remotePostHelper.Add("postal_code", order.BillingZipPostalCode);
            remotePostHelper.Add("city", order.BillingCity);
            StateProvince billingStateProvince = StateProvinceManager.GetStateProvinceByID(order.BillingStateProvinceID);
            if (billingStateProvince != null)
                remotePostHelper.Add("state", billingStateProvince.Abbreviation);
            else
                remotePostHelper.Add("state", order.BillingStateProvince);
            Country billingCountry = CountryManager.GetCountryByID(order.BillingCountryID);
            if (billingCountry != null)
                remotePostHelper.Add("country", billingCountry.ThreeLetterISOCode);
            else
                remotePostHelper.Add("country", order.BillingCountry);
            remotePostHelper.Post();
            return string.Empty;
        }



In above code , there is no "return_url", so I added following code :

            remotePostHelper.Add("return_url", CommonHelper.GetStoreLocation(false) + "MoneybookersReturn.aspx");

----------------------------------------------------------------------------------------------------------------------

Result :

window NOT close automatically at the end of the transaction, AND CAN be returned to MoneybookersReturn.aspx

Please read next .............................................
14 yıl önce
Following code from MoneybookersReturn.aspx.cs

protected void Page_Load(object sender, EventArgs e)
        {
            Response.CacheControl = "private";
            Response.Expires = 0;
            Response.AddHeader("pragma", "no-cache");

            //TODO implement, validate order
            //Response.Redirect("~/Default.aspx");

            if (!Page.IsPostBack)
            {
                string pay_to_email = HttpContext.Current.Request.Form["pay_to_email"];
                string pay_from_email = HttpContext.Current.Request.Form["pay_from_email"];
                string merchant_id = HttpContext.Current.Request.Form["merchant_id"];
                string mb_transaction_id = HttpContext.Current.Request.Form["mb_transaction_id"];
                string mb_amount = HttpContext.Current.Request.Form["mb_amount"];
                string mb_currency = HttpContext.Current.Request.Form["mb_currency"];
                string status = HttpContext.Current.Request.Form["status"];
                string md5sig = HttpContext.Current.Request.Form["md5sig"];
                string amount = HttpContext.Current.Request.Form["amount"];
                string currency = HttpContext.Current.Request.Form["currency"];

                if (status == "2")
                {
                    //TODO test
                    //TODO validate amount and etc
                    Order order = OrderManager.GetOrderByID(Convert.ToInt32(mb_transaction_id));
                    OrderManager.MarkOrderAsPaid(order.OrderID);

                    Response.Redirect("~/CheckoutCompleted.aspx");
                }
                else
                    Response.Redirect("~/Default.aspx");

            }
        }



###############################################################

I dont know, why  8th line in  code          

//TODO implement, validate order
Response.Redirect("~/Default.aspx");


so i cancel this line.


Now Code works normal, but "status" always is not equal to "2" .  and placed order always is "Order Status : Pending", "Payment Status : Pengding".



Thanks
14 yıl önce
I have tested this file MoneybookersReturn.aspx and POST some Parameter (status, merchant_id....etc ). This Code is correct , placed order Turns to "Paid" from "Pending".

so I am sure that the returned parameters(status ....etc) from Moneybooker has problem.

#########################################################################

Please let us to check this file : MoneybookersPaymentProcessor.cs in Nop.Payment.Moneybookers

           
remotePostHelper.Add("return_url", CommonHelper.GetStoreLocation(false) + "MoneybookersReturn.aspx");
remotePostHelper.Add("cancel_url", CommonHelper.GetStoreLocation(false) + "Default.aspx");
remotePostHelper.Add("status_url", CommonHelper.GetStoreLocation(false) + "MoneybookersReturn.aspx");


you also can set return_url to "CheckoutCompleted.aspx".

"status_url" accept the returned parameters from Moneybookers and processes them. so i am sure Moneybookers dont return parameters to "status_url", so placed order is alwasy "Pending".

Anybody konw why? If i need to set something in our Moneybookers Account ?





Thanks
14 yıl önce
Not sure about you error return but if the payment worked then it is the same as for a new payment gateway I have been developing. I was just looking at the code. OrderStatusID does not get set. If you were to look at your order in the administration section then the payment status will be Paid. But this is the PaymentStatusID and so it gets set, but not the OrderStatusID whish is still saying "Pending".

The secret is in the MarkOrderAsPaid routine. As you can see from the code below PaymentStatusID is set to Paid but order.OrderStatus is not assigned a value and remains as the previous status "Pending".

So what the fix is will depend on your business logic and whether you want to manually validate the order as paid once it is checked in the bank or straight away. So in this first mode the code as is works correctly and you can approved the order in the administration section once it has been checked.

But for other applications like an immediate sale you actially want to tell the customer that the order is approved straight away - that's if you can get that confirmation directy from your gateway provider. (need to check those error responses in the payment gateway manual)

But there simply might just be to many transactions to manually check and approve each one in a timely fashion. Especially for immediate delivery items like music tunes downloads or concert tickets for shows where immediately after the customer knows it has been paid and it is approved at the payment gateway then they want to get their product.

So if you want this mode of operation then you need to change OrderManager.aspx in the business logic (See new routine below) and change the order.OrderStatus to OrderStatusEnum.Complete.

Not sure where to from here would be interested if anyone else is making this change ? Makes downloads possible immediately. All depends on your business model and how you want haddle the reconciliation of transactions.

All the best A

// UpdateOrder now sets set the order status to complete

order = UpdateOrder(order.OrderID, order.OrderGUID, order.CustomerID, order.CustomerLanguageID,
                    order.CustomerTaxDisplayType, order.CustomerIP, order.OrderSubtotalInclTax, order.OrderSubtotalExclTax, order.OrderShippingInclTax,
                    order.OrderShippingExclTax, order.PaymentMethodAdditionalFeeInclTax, order.PaymentMethodAdditionalFeeExclTax,
                    order.OrderTax, order.OrderTotal, order.OrderDiscount,
                    order.OrderSubtotalInclTaxInCustomerCurrency, order.OrderSubtotalExclTaxInCustomerCurrency,
                    order.OrderShippingInclTaxInCustomerCurrency, order.OrderShippingExclTaxInCustomerCurrency,
                    order.PaymentMethodAdditionalFeeInclTaxInCustomerCurrency, order.PaymentMethodAdditionalFeeExclTaxInCustomerCurrency,
                    order.OrderTaxInCustomerCurrency, order.OrderTotalInCustomerCurrency,
                    order.OrderDiscountInCustomerCurrency, order.CustomerCurrencyCode, order.OrderWeight,
                    order.AffiliateID, OrderStatusEnum.Complete, order.AllowStoringCreditCardNumber, order.CardType,
                    order.CardName, order.CardNumber, order.MaskedCreditCardNumber,
                    order.CardCVV2, order.CardExpirationMonth, order.CardExpirationYear,
                    order.PaymentMethodID, order.PaymentMethodName,
                    order.AuthorizationTransactionID,
                    order.AuthorizationTransactionCode, order.AuthorizationTransactionResult,
                    order.CaptureTransactionID, order.CaptureTransactionResult,
                    order.SubscriptionTransactionID, order.PurchaseOrderNumber, PaymentStatusEnum.Paid, DateTime.Now,
                    order.BillingFirstName, order.BillingLastName, order.BillingPhoneNumber,
                    order.BillingEmail, order.BillingFaxNumber, order.BillingCompany, order.BillingAddress1,
                    order.BillingAddress2, order.BillingCity,
                    order.BillingStateProvince, order.BillingStateProvinceID, order.BillingZipPostalCode,
                    order.BillingCountry, order.BillingCountryID, order.ShippingStatus,
                    order.ShippingFirstName, order.ShippingLastName, order.ShippingPhoneNumber,
                    order.ShippingEmail, order.ShippingFaxNumber, order.ShippingCompany,
                    order.ShippingAddress1, order.ShippingAddress2, order.ShippingCity,
                    order.ShippingStateProvince, order.ShippingStateProvinceID, order.ShippingZipPostalCode,
                    order.ShippingCountry, order.ShippingCountryID,
                    order.ShippingMethod, order.ShippingRateComputationMethodID, order.ShippedDate,
                    order.TrackingNumber, order.Deleted, order.CreatedOn);

// UpdateOrder did not set the status as below
order = UpdateOrder(order.OrderID, order.OrderGUID, order.CustomerID, order.CustomerLanguageID,
                    order.CustomerTaxDisplayType, order.CustomerIP, order.OrderSubtotalInclTax, order.OrderSubtotalExclTax, order.OrderShippingInclTax,
                    order.OrderShippingExclTax, order.PaymentMethodAdditionalFeeInclTax, order.PaymentMethodAdditionalFeeExclTax,
                    order.OrderTax, order.OrderTotal, order.OrderDiscount,
                    order.OrderSubtotalInclTaxInCustomerCurrency, order.OrderSubtotalExclTaxInCustomerCurrency,
                    order.OrderShippingInclTaxInCustomerCurrency, order.OrderShippingExclTaxInCustomerCurrency,
                    order.PaymentMethodAdditionalFeeInclTaxInCustomerCurrency, order.PaymentMethodAdditionalFeeExclTaxInCustomerCurrency,
                    order.OrderTaxInCustomerCurrency, order.OrderTotalInCustomerCurrency,
                    order.OrderDiscountInCustomerCurrency, order.CustomerCurrencyCode, order.OrderWeight,
                    order.AffiliateID, order.OrderStatus, order.AllowStoringCreditCardNumber, order.CardType,
                    order.CardName, order.CardNumber, order.MaskedCreditCardNumber,
                    order.CardCVV2, order.CardExpirationMonth, order.CardExpirationYear,
                    order.PaymentMethodID, order.PaymentMethodName,
                    order.AuthorizationTransactionID,
                    order.AuthorizationTransactionCode, order.AuthorizationTransactionResult,
                    order.CaptureTransactionID, order.CaptureTransactionResult,
                    order.SubscriptionTransactionID, order.PurchaseOrderNumber, PaymentStatusEnum.Paid, DateTime.Now,
                    order.BillingFirstName, order.BillingLastName, order.BillingPhoneNumber,
                    order.BillingEmail, order.BillingFaxNumber, order.BillingCompany, order.BillingAddress1,
                    order.BillingAddress2, order.BillingCity,
                    order.BillingStateProvince, order.BillingStateProvinceID, order.BillingZipPostalCode,
                    order.BillingCountry, order.BillingCountryID, order.ShippingStatus,
                    order.ShippingFirstName, order.ShippingLastName, order.ShippingPhoneNumber,
                    order.ShippingEmail, order.ShippingFaxNumber, order.ShippingCompany,
                    order.ShippingAddress1, order.ShippingAddress2, order.ShippingCity,
                    order.ShippingStateProvince, order.ShippingStateProvinceID, order.ShippingZipPostalCode,
                    order.ShippingCountry, order.ShippingCountryID,
                    order.ShippingMethod, order.ShippingRateComputationMethodID, order.ShippedDate,
                    order.TrackingNumber, order.Deleted, order.CreatedOn);

/PS if you get the values back from your gateway you might also want to put the following code in your GatewayPaymentReturn routine

                                    order.AuthorizationTransactionCode = acqResponseCode;
                                    order.AuthorizationTransactionID = authorizeID;
                                    order.AuthorizationTransactionResult = cscResultCode;
                                    order.CardType = cardType;
                                    order.CaptureTransactionID = transactionNr;
                                    order.CaptureTransactionResult = receiptNo;

                                    if (OrderManager.CanMarkOrderAsPaid(order))
                                    {
                                        OrderManager.MarkOrderAsPaid(order.OrderID);
                                    }

                                    Response.Redirect("~/CheckoutCompleted.aspx");
14 yıl önce
Hi, Yidna

I have tested this file MoneybookersReturn.aspx and POST some Parameter (status="2", merchant_id =....etc ). This Code is correct , order can turn to "Paid" from "Pending".

so it is not the problem of MarkOrderAsPaid. But returned Parameter from Moneybookers have problems
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.