I am facing exactly similer issue as this issue,(I am using DIBS test card). I checked all relative posts but somehow could not solve it. I did all the configuration suggested in www.publicvoid.dk/...ludeDIBSAsAPaymentMethod.aspx. Also selected "Checkout" pipeline to execute. I am being redirected to Payment page when I call Library.CreatePayment(PaymentMethodId) and after successful payment I am redirected back to successUrl (confirmation page in my case). But still "Checkout" pipeline is not executed after payment callback, my basket is not cleared. My payment status is "Pending authorization" (in payment_status table) which is not changing to acquired.
Here is my config :
testMode="True"
debug="False"
login="*********"
password="*****************"
callbackUrl="(auto)"
acceptUrl="http://localhost:13267/en-us/paymentconfirmation.aspx"
cancelUrl="http://localhost:13267/en-us/productoverview.aspx"
merchant="90151341"
useMd5="False"
key1="******************************************************"
key2="******************************************************" />
And after successful payment following parameters are returned :
merchant +" --->"+ *******
test +" --->"+ 1
decorator +" --->"+ default
callbackurl +" --->"+ http://localhost:13267/9/26/PaymentProcessor.axd
lang +" --->"+ en
currency +" --->"+ EUR
amount +" --->"+ 291300
submitBasket +" --->"+ yes
orderGuid +" --->"+ 18a76c1a-4169-47e3-a317-175402d869e0
paytype +" --->"+ V-DK
flexwin_cardlogosize +" --->"+ 1
orderid +" --->"+ Reference-52
accepturl +" --->"+ http://localhost:13267/en-us/paymentconfirmation.aspx
cancelurl +" --->"+ http://localhost:13267/en-us/productoverview.aspx
transact +" --->"+ 727162826
cardnomask +" --->"+ XXXXXXXXXXXX0000
approvalcode +" --->"+ 123456
statuscode +" --->"+ 2
Am I missing any part of configuration? Or what could be problem here?
I have posted an answer at http://our.umbraco.org/projects/website-utilities/ucommerce/ucommerce-support/41201-Checkout-pipeline-not-executing-automatically-after-DIBS-payment-callback
Please refer to that to keep the conversation in a single place.
Thanks.
Related
Hope you all are doing well. I am new working with Google ads api. I have to retrieve information regarding keywords i.e how many people searched certain keywords , how many clicks and so on... so I have created a manager account on Google ads and under that I have created client account. In client account I have added keywords under keyword planner and I am getting all information mentioned above but I want to get it through REST API in python.
I have everything needed to access API:
(Developer token
login_customer_id
Client ID
Client Secret
refresh token) I have given this information in the .yaml file. and I assume login_customer_id is the manager account id.
Below is the code to access all the keywords information. here I have given the client_idfrom which I want to access keywords information.
import argparse
import sys
from google.ads.googleads.client import GoogleAdsClient
from google.ads.googleads.errors import GoogleAdsException
def main(client, customer_id):
ga_service = client.get_service("GoogleAdsService")
query = """
SELECT
campaign.id,
campaign.name,
ad_group.id,
ad_group.name,
ad_group_criterion.criterion_id,
ad_group_criterion.keyword.text,
ad_group_criterion.keyword.match_type,
metrics.impressions,
metrics.clicks,
metrics.cost_micros
FROM keyword_view WHERE segments.date DURING LAST_7_DAYS
AND campaign.advertising_channel_type = 'SEARCH'
AND ad_group.status = 'ENABLED'
AND ad_group_criterion.status IN ('ENABLED', 'PAUSED')
ORDER BY metrics.impressions DESC
LIMIT 50"""
# Issues a search request using streaming.
search_request = client.get_type("SearchGoogleAdsStreamRequest")
search_request.customer_id = customer_id
search_request.query = query
response = ga_service.search_stream(search_request)
for batch in response:
for row in batch.results:
campaign = row.campaign
ad_group = row.ad_group
criterion = row.ad_group_criterion
metrics = row.metrics
print(
f'Keyword text "{criterion.keyword.text}" with '
f'match type "{criterion.keyword.match_type.name}" '
f"and ID {criterion.criterion_id} in "
f'ad group "{ad_group.name}" '
f'with ID "{ad_group.id}" '
f'in campaign "{campaign.name}" '
f"with ID {campaign.id} "
f"had {metrics.impressions} impression(s), "
f"{metrics.clicks} click(s), and "
f"{metrics.cost_micros} cost (in micros) during "
"the last 7 days."
)
# [END get_keyword_stats]
if name == "main":
googleads_client=GoogleAdsClient.load_from_storage("C:\Users\AnoshpaBansari\PycharmProjects\GoogleAPI\src\creds\googleads.yaml")
parser = argparse.ArgumentParser(
description=("Retrieves a campaign's negative keywords.")
)
# The following argument(s) should be provided to run the example.
#parser.add_argument(
# "-c",
# "--customer_id",
# type=str,
#required=True,
#help="The Google Ads customer ID.",
#)
#args = parser.parse_args()
try:
main(googleads_client, "----------")
except GoogleAdsException as ex:
print(
f'Request with ID "{ex.request_id}" failed with status '
f'"{ex.error.code().name}" and includes the following errors:'
)
for error in ex.failure.errors:
print(f'\tError with message "{error.message}".')
if error.location:
for field_path_element in error.location.field_path_elements:
print(f"\t\tOn field: {field_path_element.field_name}")
sys.exit(1)
but when I run the code I receive this error. I don't know what I am doing wrong.. Can anyone please help?
enter image description here
You must login in Google Ads Manager accounts, go Tools & Settings > API Center and accept the API terms and conditions.
I'm designing a system that has a lot of requirements around user management/permissions, so I decided to use Spring Security ACL to manage the permissions at the Domain Objects level.
Although, using ACLs to maintain the relations between Users and Entities force us to rely on that to present the data on the UI.
The PostFilter solution that is provided by Spring Security does a good job filtering the objects that a User can/cannot see but it has a big performance issue when we're dealing with an entity that has hundreds/thousands of entries, because we need to load everything from the database and then discard the objects that user isn't allowed to "see".
That problem is described here - SEC-2409 - but it'll take some time until the feature is available. So, I'm trying to find a workaround to use Spring Security ACL but avoid the performance issue.
I thought about implementing some code to retrieve the Objects that a User can access (after the authentication process) and keep that information available to be used on every request to allow the developers to use that info to perform the queries and not relying on the PostFilter.
In order to implement that, I'm trying to find a way to retrieve the list of permissions for a given principal/granted authority but I'm not able to find a way to do that with the available AclService implementations.
Example: aclService.getObjectIdentityList(<sid>,<acl_class>)
Note: The method should use the inheritance structure and include all the ObjectIdentities that are inherited from a parent entry
Any suggestion to get the data or another approach to solve this problem?
UPDATE
I already found a way to retrieve the List of objects that a User can access.
List<ObjectIdentity> childObjects = aclService.findChildren(objectIdentity);
Map<ObjectIdentity, Acl> result = aclService.readAclsById(childObjects, sids);
And this approach work for us, because we just have a few entities which the access is controlled by ACLs, so we can construct the list of ObjectsIdentities that a User has access.
Although, the Map that is being return, is returning all the ACLs for the ObjectIdentities that are being passed and then I need to check the if the user has access to each ObjectIdentity that is being returned.
Do you have an easy way to do this or to simplify all of this logic?
The current approach to handling larger data sets is to update your query to include the currently logged in user within your query. For example, you can use Spring Security and Spring Data integration to update your query to refer to the current user:
#Query("select d from MyDomain d where d.owner = #{principal.name}")
Obviously this is not ideal because you need to manage the permissions manually. Once we resolve SEC-2409 Spring can do a lot of the heavy lifting for you automatically.
I ran into this question from needing a solution to deal with the lack of SEC-2409. Looking at JdbcAclService.findChildren() lead me to this
private final String FIND_OBJECTS_WITH_ACCESS = ""+
"SELECT " +
" obj.object_id_identity AS obj_id, " +
" class.class AS class " +
"FROM " +
" acl_object_identity obj, " +
" acl_class class, " +
" acl_entry entry " +
"WHERE " +
" obj.object_id_class = class.id " +
" and entry.granting = true " +
" and entry.acl_object_identity = obj.id " +
" and entry.sid = (SELECT id FROM acl_sid WHERE sid = ?) " +
" and obj.object_id_class = (SELECT id FROM acl_class WHERE acl_class.class = ?) " +
"GROUP BY " +
" obj.object_id_identity, " +
" class.class ";
public List<ObjectIdentity> getObjectsWithAccess(Class clazz, String sid) {
Object[] args = { sid, clazz.getName() };
List<ObjectIdentity> objects = _jdbcTemplate.query(FIND_OBJECTS_WITH_ACCESS, args, getRowMapper());
return objects.size() == 0 ? null : objects;
}
private RowMapper<ObjectIdentity> getRowMapper() {
return (rs, rowNum) -> {
String javaType = rs.getString("class");
Long identifier = rs.getLong("obj_id");
return new ObjectIdentityImpl(javaType, identifier);
};
}
I am creating a program using the QBFC13 that is supposed to create a deposit from an other current asset type of account to a bank account. However, when the depositadd method is executed the payee doesn't get filled in on the bank account. How do i get the Payee information filled out?
I dont have a high enough reputation to post pictures so this is a link to the picture of the field i need filled out: http://i.stack.imgur.com/nqWOh.jpg
Here is my current code:
Public Sub CreateDeposit()
On Error GoTo Errs
Dim depositadd As IDepositAdd
depositadd = msgSetRequest.AppendDepositAddRq()
depositadd.DepositToAccountRef.FullName.SetValue("checking")
depositadd.Memo.SetValue("newdeposit test")
depositadd.TxnDate.SetValue(Date.Today)
Dim depositLineAdd As IDepositLineAdd
depositLineAdd = depositadd.DepositLineAddList.Append()
depositLineAdd.ORDepositLineAdd.DepositInfo.AccountRef.ListID.SetValue("1EE0000-943382783")
depositLineAdd.ORDepositLineAdd.DepositInfo.EntityRef.ListID.SetValue("80002534-1335362979")
depositLineAdd.ORDepositLineAdd.DepositInfo.Amount.SetValue(150.0)
depositLineAdd.ORDepositLineAdd.DepositInfo.Memo.SetValue("test memo lineitem")
' send the request to QB
Dim msgSetResponse As IMsgSetResponse
msgSetResponse = qbSessionManager.DoRequests(msgSetRequest)
' check to make sure we have objects to access first
' and that there are responses in the list
If (msgSetResponse Is Nothing) Or _
(msgSetResponse.ResponseList Is Nothing) Or _
(msgSetResponse.ResponseList.Count <= 0) Then
Exit Sub
End If
' Start parsing the response list
Dim responseList As IResponseList
responseList = msgSetResponse.ResponseList
MsgBox(msgSetRequest.ToXMLString())
' go thru each response and process the response.
' this example will only have one response in the list
' so we will look at index=0
Dim response As IResponse
response = responseList.GetAt(1)
If (Not response Is Nothing) Then
If response.StatusCode <> "0" Then
MsgBox("DepositFunds unexpexcted Error - " & vbCrLf & "StatusCode = " & response.StatusCode & vbCrLf & vbCrLf & response.StatusMessage)
Else
MsgBox("The funds were successfully deposited in Checking")
MsgBox(msgSetResponse.ToXMLString())
End If
End If
Exit Sub
Errs:
MsgBox("HRESULT = " & Err.Number & " (" & Hex(Err.Number) & ") " & vbCrLf & vbCrLf & Err.Description, _
MsgBoxStyle.Critical, _
"Error in DepositFunds")
End Sub
This actually isn't an SDK issue, as it's how QuickBooks was designed. Because a deposit transaction in QuickBooks can contain multiple lines, the bank register won't show any names even if there's just one line. You can manually go to the bank register and add the name, but there's not a way to do it through the SDK. It's a two step process to even do it in QuickBooks, where you create the deposit, then go and edit it in the register.
If you need to have this information show from transaction using the SDK, then you might have to use Journal Entries instead of a Deposit transaction.
In my CF app, I've used the CF OAuth code at riaforge to get request token and access token from QuickBooks Online and it works fine.
After I tried to make a QBO API call by starting to build the http headers of the call (I followed the instructions on the section "HTTP Authorization Header" here: Implement OAuth in Your App). Then built the http header based on the methods of the code at riaforge because it worked. In addition, I've respected the order of the parameters given by Intuit in the previous link).
When I launched the API Call, I received the response: "signature_invalid"
I really want directions on how to sign the QBO online API Call with CF 9 if I have ready the 6 header parameters:
oauth_token
oauth_nonce
oauth_consumer_key
oauth_signature_method
oauth_timestamp
oauth_version
(But if possible a working code would be better)
Thank you in advance for your time and help
this is what I use for generating the signature and header for the request token, simple additions are used for the other signatures you'll need along the way.
paramsStr = "oauth_callback=" & encodeData(CALL_BACK_URL) & "&" & "oauth_consumer_key=" & sConsumerKey & "&" & "oauth_nonce=" & session.nonce & "&" & "oauth_signature_method=" & SIGNMETHOD & "&" & "oauth_timestamp=" & TIMESTAMP & "&" & "oauth_version=" & VERSION;
signStr = "POST&" & encodeData(REQUEST_TOKEN_URL) & "&" & encodeData(paramsStr);
signature = computeHMACSignature(signStr, sConsumerSecret & "&");
authHeader = 'OAuth ' & createHeaderElement("oauth_consumer_key", trim(sConsumerKey)) & ", " & createHeaderElement("oauth_nonce", trim(session.nonce)) & "," & createHeaderElement("oauth_signature_method", trim(signmethod)) & ", " & createHeaderElement("oauth_signature", trim(signature)) & ", " & createHeaderElement("oauth_timestamp", trim(TIMESTAMP)) & ", " & createHeaderElement("oauth_version", trim(VERSION)) & ", " & createHeaderElement("oauth_callback", trim(CALL_BACK_URL));
I am building a hotel site for my final year project, I am trying to send an automated
email to the customers once they have book.
used this code:
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.To.Add(email.Text);
message.Subject = "Hotel Reservation";
message.From = new System.Net.Mail.MailAddress("Reservation#hotel.com");
message.Body = ("Dear" + first_name.Text + "Your reservation made for " + rates.Text +" " + nor.Text + " " + "is successful. Please print out this email for reference while checkin. Thank you");
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("yoursmtphost"); smtp.Send(message);
when i run it shows me this error highlighting smtp.Send(message);:
SmtpException was unhandled by the user code and
Failure sending mail.
There are several reasons for this error.
To Email is invalid
You have not specified credentials. (UserName / Password)
There might be a firewall problem
SMTP port might be other than 25