PayuMoney test card details - payumoney

I am trying to integrate the PayuMoney payment gateway in my application but test cards are not working.
Can anyone help me with this?

PayU offers the following test credentials and it works for me:
Card Type: Master
Card Name: Test
Card Number: 5123456789012346
Expiry Date: 05/21
CVV: 123
OTP : 123456

Card Type: VISA
Card 1:- Debit/Credit Card
Card Number: 4854 4601 9876 5435
Expiry Date: 05/21
CVV: 123
OTP : 123456 for Success & 000000 (6 times-0) for Failure
Card Type: Master
Card 2:- Debit/Credit Card (recurring payments)
Card Number: 5123 4567 8901 2346
Expiry Date: 05/21
CVV: 123
OTP : 123456 for Success & 000000 (6 times-0) for Failure

Testing:
You can use the following PayU India test card for testing:

Related

Need help in splunk regex field extraction

I have a splunk query(index=sat sourcetype="sat_logs" Message="application message published for") which returns list of messages published by different applications.I need to extract specific field values from the messages.Please let me know the query to get the expected results. Thanks
Splunk query results:
Message:Alpha application message published for UserId: 12345678, UID: 92345678, Date: 2019-10-04, Message: {"Application":"Alpha","ID":"123"}
Message:Beta application message published for UserId: 12345670, UID: 92345670,Date: 2019-10-03, Message: {"Application":"Beta","ID":"623"}
Message:Zeta application message published for UserId: 12345677, UID: 92345677,Date: 2019-10-02, Message: {"Application":"Zeta","ID":"523"}
Expected fields to be extracted and displayed as Table
Application UserId UID ID
Alpha 12345678 92345678 123
Beta 12345670 92345670 623
Zeta 12345677 92345677 523
The rex command can do that for you. Assuming the fields are always in the same order, this should do the job.
index=sat sourcetype="sat_logs" Message="application message published for"
| rex field=Message "UserId: (?<UserId>[^,]+), UID: (?<UID>[^,]+).*{"Application":"(?<Application>[^"]+)","ID":"(?<ID>[^"]+)"
| table Application UserId UID ID

External value usage in Datamapper - WSO2 ESB

A data format with:
Item: A
Id: 001
Price: 100.00
Should be converted into:
ItemName: A
ItemId: 001
Price: 100.00 * (1 + 0.1) ---->(here the price should be calculated with commision)
Here commision is 0.1, should come from a static property (not constant but the commission may change daily) externally. How can I fix this using WSO2 ESB DataMapper?

Splitting one fields into several comments - SQL

I have a table that have multiple comments in one field.
For eg,
1) CLAIM REFILED Rebecca Byrd 1/17/2018 3:17:53 PM PER CHGS, WE NEED
TO REFILE THIS CLAIM Rebecca Byrd 1/10/2018 1:55:37 PM WAITING ON HOME
PLAN TO REPLY Rebecca Byrd 1/2/2018 1:58:31 PM A/R SENT TO CHGS ON
THIS CLAIM. DENIED AS A DUPLICATE, BUT THERE WAS ONLY ONE CLAIM IN
ILINKBLUE FOR THIS DOS. Test Byrd 12/29/2017 6:34:36 AM
2) HCRR ACCOUNT Sheila Johnson 9/28/2017 7:37:55 AM
3) Contacted VA VISN spoke with Mary she stated pmt $18.32 was made on
06/27/2014 - #675678- she gave me treasury uh# 86-72-1141. I
contacted TEST and spoke with TEST - i gave her number, date and pmt -
she found ck and pmt of $0.00 for date 06/27/2014- she said it was
cashed under blah bank - trace #0jgdjgkd. Test Test 7/28/2017 1:21:11
PM
And I want to split it into different rows like this
1) CLAIM REFILED Rebecca Byrd 1/17/2018 3:17:53 PM
2) PER BCBS, WE NEED TO REFILE THIS CLAIM Rebecca Byrd 1/10/2018 1:55:37 PM
3) WAITING ON HOME PLAN TO REPLY Rebecca Byrd 1/2/2018 1:58:31 PM
4) A/R SENT TO BCBS ON THIS CLAIM. DENIED AS A DUPLICATE, BUT THERE WAS ONLY ONE CLAIM IN ILINKBLUE FOR THIS DOS. Rebecca Byrd 12/29/2017 6:34:36 AM
All the comments will end with a date. So I will thinking I can use AM or PM as a separator. But Having difficulty separating it.
First of all: This design is very bad and you should - if there is any chance -
really change this! Use this approach to transfer all comments into a related side table.
Your question is not very clear, but my magic crystal ball was in a good mood and telling me, that you might be looking for this:
CREATE FUNCTION dbo.SplitCommentOnTime(#str VARCHAR(MAX))
RETURNS TABLE
AS
RETURN
WITH recCTE AS
(
SELECT 1 AS Pos
,LEFT(#str,PATINDEX('%:[0-5][0-9] [AP]M %',#str + ' ')+5) AS Part
,SUBSTRING(#str,PATINDEX('%:[0-5][0-9] [AP]M %',#str + ' ')+7,LEN(#str)) AS Remainder
UNION ALL
SELECT Pos+1
,LEFT(Remainder,PATINDEX('%:[0-5][0-9] [AP]M %',Remainder + ' ')+5)
,SUBSTRING(Remainder,PATINDEX('%:[0-5][0-9] [AP]M %',Remainder + ' ')+7,LEN(#str))
FROM recCTE
WHERE PATINDEX('%:[0-5][0-9] [AP]M %',Remainder + ' ')>0
)
SELECT Pos,Part
FROM recCTE;
GO
DECLARE #tbl TABLE(ID INT IDENTITY,Comment VARCHAR(MAX));
INSERT INTO #tbl VALUES
('CLAIM REFILED Rebecca Byrd 1/17/2018 3:17:53 PM PER CHGS, WE NEED TO REFILE THIS CLAIM Rebecca Byrd 1/10/2018 1:55:37 PM WAITING ON HOME PLAN TO REPLY Rebecca Byrd 1/2/2018 1:58:31 PM A/R SENT TO CHGS ON THIS CLAIM. DENIED AS A DUPLICATE, BUT THERE WAS ONLY ONE CLAIM IN ILINKBLUE FOR THIS DOS. Test Byrd 12/29/2017 6:34:36 AM')
,('HCRR ACCOUNT Sheila Johnson 9/28/2017 7:37:55 AM')
,('Contacted VA VISN spoke with Mary she stated pmt $18.32 was made on 06/27/2014 - #675678- she gave me treasury uh# 86-72-1141. I contacted TEST and spoke with TEST - i gave her number, date and pmt - she found ck and pmt of $0.00 for date 06/27/2014- she said it was cashed under blah bank - trace #0jgdjgkd. Test Test 7/28/2017 1:21:11 PM')
SELECT *
FROM #tbl
OUTER APPLY dbo.SplitCommentOnTime(Comment);
GO
DROP FUNCTION dbo.SplitCommentOnTime;
The result
ID Pos Part
1 1 CLAIM REFILED Rebecca Byrd 1/17/2018 3:17:53 PM
1 2 PER CHGS, WE NEED TO REFILE THIS CLAIM Rebecca Byrd 1/10/2018 1:55:37 PM
1 3 WAITING ON HOME PLAN TO REPLY Rebecca Byrd 1/2/2018 1:58:31 PM
1 4 A/R SENT TO CHGS ON THIS CLAIM. DENIED AS A DUPLICATE, BUT THERE WAS ONLY ONE CLAIM IN ILINKBLUE FOR THIS DOS. Test Byrd 12/29/2017 6:34:36 AM
2 1 HCRR ACCOUNT Sheila Johnson 9/28/2017 7:37:55 AM
3 1 Contacted VA VISN spoke with Mary she stated pmt $18.32 was made on 06/27/2014 - #675678- she gave me treasury uh# 86-72-1141. I contacted TEST and spoke with TEST - i gave her number, date and pmt - she found ck and pmt of $0.00 for date 06/27/2014- she said it was cashed under blah bank - trace #0jgdjgkd. Test Test 7/28/2017 1:21:11 PM
Some explanation
The function uses a recursive CTE jumping through your strings looking for a pattern. the pattern is %:[0-5][0-9] [AP]M %. That means: a double point, followed by one digit out of 0-5, then a digit 0-9, a blank, either A or P and then an M and a blank.
The rest is LEFT and SUBSTRING
Hint
After having split these string monsters you might use REVERT() and search for the the third blank. Take this fragment, again reverted, and convert it to a real DATETIME. This way you'd get a side table with a good query performance.
You might get the commenter out of this the same way...

Shopify Math logic not working properly

on my store when using custom template i got a price based on some values
Price * 2 it works
Example.
17.99 * 2
I got in cart: 35.98, this is good.
But when using:
17.99 * 0.5, should be 8.99
i got: 17.99
Why?????????? Any ideas?
Im adding as value this way:
<option value="{{ qty | times:0.50 }}" data-qua="{{ qty | times:0.50 }}">{{ inches }}m</option>
Well, i have found that due to a Shopify limitation you can not use decimals as quantity, so cannot do PRICE * 0.5
If is there a any solution to this let me know.
Sell by unit pricing. As you figured out, no shopping cart lets you sell 0.3456 of something. While you can buy .0005342 of a bitcoin, you cannot sell non-integer anything with Shopify. So adjust your formula to sell 1 thing at $.003456 or whatever... and collect your fortune that way.

VB.net string split get the first value

I am working with a string that will always have "Product 1:"
in it. I want to get the value of what comes after "product 1:". Here are some example of the string
Hello UserName Product 1: Alcatel Product 2: Samsung Truck: Fedex
Ending: Canada
Hello UserName Product 1: NOKIA Truck: Fedex Ending: Canada
Hello UserName Product 1: Alcatel Product 2: Samsung Product 3: NOKIA
Truck: Canada POST Ending: Brazil
Hello UserName Product 1: Alcatel-55 Special Product 2: Samsung
Product 3: NOKIA Truck: Canada POST Ending: Brazil
Hello UserName Product 1: Samsung Galaxy S6-33 Truck: Canada POST
Ending: Brazil
The string I am looking for:
Alcatel
NOKIA
Alcatel
Alcatel-55
Samsung Galaxy S6-33
I was having a little bit of luck with
sMessage.Split("Product 1:")(1).Split(":")(1)
But with above code I still get
Alcatel
NOKIA Truck
Alcatel
Alcatel-55
Samsung Galaxy S6-33 Truck
You could replace the undesired values with:
sMessage.Split("Product 1:")(1).Split(":")(1).Replace(" Truck", "")
You can also match the desired string with regular expressions:
(?<=Product 1: )((.*)(?= Product 2:)|(.*)(?= Truck:))
Example:
Dim regex As Regex = New Regex("(?<=Product 1: )((.*)(?= Product 2:)|(.*)(?= Truck:))")
Dim match As Match = regex.Match("Hello UserName Product 1: NOKIA Truck: Fedex Ending: Canada")
Note that if there are more delimiters than Product x and Truck you want to remove then you need to add those to the regular expression (or replace).
Edit
Updated the regular expression to be more generic in regards of delimiter words:
(?<=Product 1: )((.*)(?= Product 2:)|(.*?)(?= \w+:)|.*)
Now it will match on Product 2: or any other, or no delimiter.
Edit 2
More simplifications:
(?<=Product 1: )((.*?)(?= \w+ ?(\d+)?:)|.*)
This last regular expression also matches correctly if there is a delimiter with multiple digits like Products 123:.
This assumes you want the value between "Product 1:" and whatever the next "tag" happens to be, which in some cases is "Product 2:" and in other cases is "Truck:". Keep in mind that this is based only on the sample you provided - if you have other "tags" which can appear after the "Product 1:", you'll need to adjust.
The following regex will get you almost what you asked for
(?:Product 1:)(?<product>.+?)(?=(\sProduct 2:)|(\sTruck:))
Using that regex, and given your sample text, you will get capture groups named "product" as follows:
Alcatel
NOKIA
Alcatel
Alcatel-55 Special
Samsung Galaxy S6-33