I have created an application that that sends error notifications to some mobile numbers located inside and outside of the United States via Twilio.
Inside the United states I get the expected results. The message shows that it is coming from my Twilio assigned phone number. However, when I test to an international destination; the results are unpredictable.
Sometimes I receive the message "from" a long number that is almost never the same twice. Other times I receive the message "from" a meaningless and sometimes strange "short code" that changes frequently as well.
How can I prevent this unwanted, unpredictable behavior?
Twilio Customer Support here - this is not really a stack overflow question as its to do with the way carriers send SMS in certain markets, but if you write into the help#twilio.com we'll explain in more detail.
Different countries actually have different policies about sender IDs. In some countries you are able to deliver A2P traffic only from alpha senders, for example. In other countries you might be able to send messages only from a local longode sender ID or from a shortcode like in USA. There are also often different routes available which may support different features. If you would like to test out features of the route your current SMS supplier has, you can send test SMS messages on mobile test numbers of telqtest.com
Related
Is it possible to anonymously programmatically verify that a transaction has reached n number of validations without running a full node? If so, what is the best means to do this?
Basically I want it to build a payment system where after the transfer is initially detected, the customer sees a message thanking them and telling them that their purchase will be processed within 24 hrs and that they'll receive an email once confirmation is complete. Then throughout the day maybe run a cron job that checks that each transaction reaches the desired number of validations and if so divide the money between two wallets and mark the product to be sent. I also don't want it to be with a service like Coinbase or Bitpay where they have control of your coins.
So far I've been experimenting with Blocktrail and mycelium gear. Both have some elements I like but still not everything that I need. With mycelium you can set the number of verifications but for instance if I want to set it for 6 verifications the customer would have to sit there possibly an hour before they see the next screen. Blocktrail allows me to query that a transaction is validated but it only has the ability to check that 1 validation was completed as far as I can tell. Can anyone suggest an API or widget that can accomplish these things? Preferably PHP or if not JQuery.
Blockchain.info has a simple Query API for querying how much bitcoin an address has received. You can add a confirmations=n parameter that will only include bitcoin that has been confirmed 'n' times. It returns a simple value in satoshis.
For example to check how much bitcoin was received with at least 2 confirmations at a specific address you could have your code query the API like this:
https://blockchain.info/q/getreceivedbyaddress/1PFtyX9nQvjP8U2N3iUk2oNorzPfpjX9sK?confirmations=2
I am a bit confused conerning the services of the SMS Provider MessageBird; their API permits to include an "Originator", which is used as the sender of the SMS. On one hand, the documentation
https://developers.messagebird.com/
states that in some countries the originator is not used and refers to a list of country-specific information. On the other hand, this list
http://support.messagebird.com/hc/en-us/sections/202017565-Country-Info-Restrictions?page=1#articles
does not include an entry for Denmark. The specific problem is that using the same account, the originator is used for Germany, but apparently doesn't work for Denmark. Does anyone have any experience with this or any information which might be helpful? If so, I would appreciate any comment.
The originator as you said it is going to be used as the sender of the SMS.
But there are restrictions as you noted on the docs. For example when you are sending messages to the US you cannot use alphanumeric originators like "Codor LLC". You need to use a numeric phone number.
If you are trying to send an SMS to Denmark from a german originator number it should work. No restrictions apply here.
Something else can be broken. Please contact support (support#messagebird.com) and we'll help you out (I work at MessageBird).
We are wondering if in Hotcakes 1.10.3, if the shipping method lookup can recognize if an address entered is a P.O. Box before returning available shipping methods.
Why we ask - our client is primarily using FedEx to deliver shipiments, but would like to default to USPS shipping methods when a customer enters a P.O. box as FedEx doesn't deliver to P.O. boxes.
I've tried out a few PO box addresses, and in our current build FedEx rates still get returned. Is there any way to block FedEx from returning if a P.O. box is entered as an address in Checkout?
Thanks much.
Disclaimer: I work for Hotcakes.
I looked at this in our code base and it was interesting to see that we're simply taking the address entered by the customer in checkout and passing it directly to the shipping provider (e.g., FedEx). In my testing using FedEx specifically, they're returning rates from their own web service, regardless to whether the address is a P.O. Box or not. They don't seem to be checking for this themselves. I didn't check the other built-in live rate providers for this answer.
I order to workaround this, you can detect this yourself and prevent this from happening in your custom viewset. However, you should be aware that doing this would really require that you test all of the use cases that you expect for your target customers to fall into on your site.
In your viewset, find the Checkout.js file in the Scripts folder.
In this file, you'll want to look for the following method and apply a check to see if the Address 1 field is a P.O. Box or not. If it is, remove the FedEx rates from the list of shipping providers that received rates. This will prevent your customer from selecting unsupported rates.
RefreshShippingRates
An example of that check in this JS file might look like this:
var address1Value = $('#shippingaddress').val()
if (address1Value.substring(0, 4) == "P.O.") {
// iterate through each rate to see if it needs to be removed
}
One of our users is getting an error when they attempt to make a purchase and I'm trying to identify why this is occurring.
The message returned from PayPal is:
<Errors xmlns="urn:ebay:apis:eBLBaseComponents">
<ShortMessage>Transaction refused</ShortMessage>
<LongMessage>This transaction cannot be completed because it violates the PayPal User Agreement.</LongMessage>
<ErrorCode>13122</ErrorCode>
<SeverityCode>Error</SeverityCode>
</Errors>
This product is working for other users, just not him.
Obviously it's violating the User Agreement but I'd like to identify why.
UPDATE
The users that are affected by it seem to all have one or more of the following: a non-UK email address, a non-UK PayPal account or a non-UK payment source.
We've not had a resolution yet, but have directed several users to contact PayPal directly. The feedback we've had is as follows:
"I tried with another paypal account, that failed too, despite being able to use both PayPal accounts to pay for other services."
"PayPal are aware of the error message, but they simply cannot explain why it's happening. After an hour on the phone with them today, they seem incapable of tracing the reason for this error."
Needless to say we've got some very frustrated users.
I had similar problem... Title of our item we were selling was:
Inc. Special Offer: <<Famous author>> eBook for only 10.00$
When we changed the title to something more descriptive, everything was OK
Did you open a ticket with MTS or call the Business Support line? If you did open a ticket can you please give me the ticket number? I'll take a look at it.
It may be something that you need to address with Business Support though.
I had this same error coming back for one of our customers and I had the same issue as #knagode with my product name.
For some reason "Dark Havana" in the product name set this off and produced this error. If I ever hear back from Paypal on why this phrase is not acceptable, I will circle back and edit this response.
It turns out that the value in "PaymentDetailsItem - Name" was one part of the problem. We didn't have any special characters (or so I thought) in there, just "product name: person name". When I spoke to PayPal support their response is as follows:
"I have checked it, it's a combination of many things that we cannot disclose.
However removing the ":" before the name PAYMENTREQUEST_0_NAME should work.
Can you send PAYMENTREQUEST_0_NAME=xxxx USER NAME
Instead of PAYMENTREQUEST_0_NAME=xxxx : USER NAME"
Once I had removed the ":" from that field, it started working again...bizarre!
This error still gets triggered with non-UK PayPal accounts but happens less frequently now.
For any others investigating this issue please be aware that PayPal has filters in place that looks for globally specific geographic terms. If any terms used in the product description trigger the filters, the transaction could be refused. In our case, we are online rug retailer with many of our products ranging across the traditional rug spectrum. We found that any rug with the term "Persia" in the title were being refused due to economic sanctions against nation states associated with that term.
The filters are not geographic only and other controversial terms could also trigger the filters to refuse the transaction. In one instance, we had a rug with "Confederate" in the product description that also triggered the filters.
I have 5 digit zip codes, these are retrieved from Google Maps Api.
My dilemma is that I have to connect to a remote database which also contains addresses. If the address does not exist in that database, I have to write it, if it does exist then I do nothing except store the ID that database has assigned to the address. The problem arises since the api to check this database does not take wildcards, the addresses in that database have 9 digit zip codes (5+4) and will not return that the rest of the address matches my address with 5 digit zip codes.
The remote system will tell me that the address does not exist with the ones I send it.
So to prevent duplicate addresses from being written to the database I would need to find the 9 digit version of the zip code I have before sending it.
How would this be done? Is there a formula for determining what the last 4 digits of a 5 digit address are? Does the USPS have an API? Does the Census have a giant table?
Insight appreciated
You are only allowed to use the USPS API for information if you are using the USPS to send out mail...
But you could check out SmartyStreets (I used to work there) or another CASS-Certified vendor. They are licensed for address verification, and you can also perform city-state and ZIP code lookups without an address (depending on who you choose).
I think you'll find them much easier and more comprehensive than the default USPS web service.
Here's some sample code... take your pick: https://github.com/smartystreets/LiveAddressSamples
The US Postal Service have a number of APIs. Their "Address Information APIs" include:
Address Standardization
Eliminate addressing errors and help ensure accurate and timely delivery. This tool corrects errors in street addresses, including abbreviations and missing information. It also supplies a ZIP+4® Code.
ZIP Code™ Lookup
Find matching ZIP Codes or ZIP+4 Codes for any given address, city, and state in the U.S.
City/State Lookup
Use a ZIP Code to get accurate city and state information.
The Address Information APIs require permission to use.