We were using the EWAY merchant plugin for Exp:resso Store and noticed that it was passing the incorrect credit card name to EWAY - instead it's reporting the billing_name for some reason, and not the name from the <input name="payment[name]"/> field.
I understand the store doesn't record any credit card info, but is there a setting I'm missing or something? Bug?
The billing_name is simply a fallback when no name is specified. Your card name input field should actually look like this:
<input name="payment[card_name]" />
I just looked at the example templates and realize this is incorrect, so will get that fixed up.
Also note there is now a dedicated ExpressionEngine Q&A site which is a better place for questions like this :)
Related
I am trying to attach a file to a Credit Adjustment via REST API by indicating the key fields.
For a regular Bill, this PUT request is successful:
https://{URL}/entity/Default/18.200.001/Bill/Bill/003838/files/Attachment Test 2.pdf
However, I am having issues identifying how should the Key1 be changed for Credit Adjustments.
I have tried a series of combinations w/o success.
Thanks.
I know Chris already answered but I wanted to share that you can find these values for any other drop down key field by opening a record of the doc type you want and looking at the URL
Try this
http://localhost/YourERP/entity/Default/20.200.001/Bill/ACR/[RefNbrHere]/files/EL Paso Texas.txt
Be sure that your file is included in the payload
I'm integrating a custom paypal credit card payment form in my project (Angular2 + Node.js).
Refer:
(1.) https://developer.paypal.com/docs/integration/direct/payments/credit-card-payments/#create-credit-card-payment
(2.) http://code.runnable.com/UXgyne_v2oZyAAC-/pay-with-a-credit-card-using-paypal-api-for-node-js
My question is do we really need to add "first_name" and "last_name" field in the form. Instead I just want to add one field for the name of card holder.
Please sugggest the best solution for my case.
Thankyou!
Well actually you can do that. The name field are not compulsory.
You could add a single field for Cardholder Name and then split it in your code so that you can populate first name and last separately.
I would like to know if there is any way to check if the user verification badge with the Instagram API?
I have saw that https://api.instagram.com/v1/users/{user-id} doesn't returns if the user is verified, but if you view the source code of a users page, you can see that it has a boolean that called isVerified key and it's value inside a json struct of the user.
Thanks!
Ok, this is not a great answer but here is how I accomplished this same task. Once I have a username from the API I do the following regex on the source of their profile page:
$response = file_get_contents('https://instagram.com/'.$username);
if (preg_match('/"user":\{"username":"'.$username.'",.*?"isVerified":true\},"__path":".*?'.$username.'.*?"/s', $response) || preg_match('/<meta content=".*?official.*?account.*?" name="description" \/>/is', $response)) {
print "VERIFIED USER!";
}
As I said before this is super hacky but the API currently doesn't provide an isVerified value. Until they do I am using this regular expression. It looks for "isVerified":true part of the JSON struct you referenced. (example: https://instagram.com/taylorswift)
We also added an additional check where if the meta content tag has "official account" in it then we assume it's official. (example: https://instagram.com/3doorsdown) We added this check because Instagram started doing verified accounts in 2014 and there are quite a few celebrities that haven't gotten a verified badge yet. It should pick up some of the pieces but could very well bring in false positives too.
NOTE: This solution will break if Instagram ever changes the JSON struct or meta tags on their pages so use at your own risk. We only needed a script to check a small amount of usernames for verified badges and I came up with this real quick. The best solution will be whenever they update their API.
I need to programmatically find the path to the Room & Resources database, preferably accessible thru a HTTP request. Just placing a HTTP request and getting the path/filename returned somewhere in the response would be sufficient.
And/Or are there any assumptions that can be made in regards to the file/path-name of Rooms & Resources? So, at the very least, I can provide an educated guest to the end user.
Since the room & resource database may be clustered - a way to determine this would also be appreciated and preferably thru a HTTP request.
NO changes can be made to the environment to get this information - this means no programming in the users mailfile or any other design changes.
The question is in regard to IBM Domino 8.5+
/J
To get the information "somewhere in the response" is quite easy: Just use the hidden ($Users)- View to get that information:
http://servername/names.nsf/($Users)/Resource%2FOrga?OpenDocument
As you see, you have to encode the slashes in the resource name with %2F
The respons will be a website, that contains Server AND FilePath in two fields:
<input name="MailServer" type="hidden" value="YourServer/Org">
<input name="MailFile" type="hidden" value="pathtoresourcedatabase.nsf">
In that document there is only the "main" server. Information about clustering would have to be obtained by looking up the MailServer- Value (in a canonicalized form) in the view ($Servers):
http://servername/names.nsf/($Servers)/CN=YourServer%2FO=Org?OpenDocument
In the result there will be a field called ClusterName:
<input name="ClusterName" type="hidden" value="YourClusterName">
And with that information you could lookup the clustermembers using the view called ($Clusters), but there you have to parse the information, as this is not a single document... Just check the output of:
http://servername/names.nsf/($Clusters)?OpenView
If you need to get a "better parseable" result, then use ReadViewEntries instead of OpenView, then the result is XML (or json, if you add another parameter &outputformat=JSON)
Theres a view for rooms and resources in the names.nsf. You can probably query this view with an http request and parse the result, to find out the path to the resource databases.
BTW. it is possible to have multiple resource database.
I am trying set up Stripe checkout so I can pass my server side customer zip/postcode to the Stripe checkout. It seems like it should be very simple but I cannot get it to work!
At it's simplest, the code I am using is:
<form action="charge.php" method="POST">
<script
src="https://checkout.stripe.com/v2/checkout.js" class="stripe-button"
data-key="pk_test_redacted"
data-amount="2000"
data-name="Demo Site"
data-description="2 widgets (£20.00)"
data-currency="gbp"
data-address_zip="NG15 6UR">
</script>
</form>
the transaction works fine but it does not pass the zip/postcode so that it can be AVS checked.
What am I doing wrong?
Edit:
So apparently you cannot pass address information using checkout.js - you can only get the form to require the address from the customer when they put their card details in using
data-address="true2"
As far as I can tell, this means I can either hassle the customer by getting them to add their address details when I already have them!
or I have to use stripe.js which means I have build my own form, make it look pretty, validate it etc. Not a massive thing but, when there is a form there that does everything I need but accept address form fields passed at form creation, it is a little annoying :-(
If anyone knows otherwise I would love to hear it but this info came from the #stripe irc channel so I think it is probably correct.
As said in the Edit, I did have to use stripe.js and make my own form. Shame this small omission means quite a bit of extra work - but still much better than Paypal's mess of APIs and documentation! Cheaper too.
Untested but there may be a solution as you can update a card before the charge , you are able to update the customers card from the $token that you pass to your backend processor in php for example:
$cu = Stripe_Customer::retrieve($customer->id);
$card = $cu->cards->retrieve($token);
$card->address_city = $form['city'];
$card->address_line1 = $form['address_line_1'];
$card->address_line2 = $form['address_line_2'];
$card->address_state = $form['county'];
$card->address_country = "United Kingdom";
$card->address_zip = $form['postcode'];
Then take the charge
$charge = Stripe_Charge::create(array(
'customer' => $customer->id, etc...