From outside system built in PHP, I wrote this following to call API for create customer account:
'customer' =>
array (
'first_name' => $_POST['datalog']['firstName'],
'last_name' => $_POST['datalog']['lastName'],
'email' => $_POST['datalog']['email'],
'verified_email'=> true,
'password'=> $rand_pass,
'password_confirmation' => $rand_pass,
//'send_email_welcome' => true,
'send_email_invite' => true,
),
Creation of customers are working successfully but they did not receive any invitation email. I have followed the Shopify Documentation : https://help.shopify.com/api/reference/customer
Try using the Customer Invites API: https://help.shopify.com/api/reference/customer#send_invite
Related
I created an app with stripe express account. Everything is working well except that the name on the receipt is my platform name instead of the connected account name
.
My plat form has businesses. Each business has their customer.
When the customer of each business pays for their services, my platform should send the receipt in the business name not my name. I am using destination charges:
try{
$charge=$stripe->charges->create([
"customer"=>$this->stripeCustID,
"amount" => $amount,
"currency" => "cad",
"description" => $this->input->post('product'),
"statement_descriptor" => mb_strimwidth($company->full_name, 0, 22, ''),
'receipt_email' => $customerEmail,
'application_fee_amount' => $fee,
'on_behalf_of' => $destinationAcct,
'transfer_data' => [
'destination' => $destinationAcct,
],
]);
What do I need to change? What am I doing wrong. I called stripe and most of them tech team have no idea how to fix this
for a customer I need to charge an applicationFee for each order that has been processed on their site from the sub customers. The whole code is working with authentication and everything.
But from the moment I'm adding:
'applicationFee' => $applicationFee
to the call I receive this error:
Error executing API call (422: Unprocessable Entity): Unable to process application request for this account. Documentation: https://docs.mollie.com/guides/handling-errors"
The content of "$applicationFee" is correct, that I was able to check already.
The $shop_mollie_data->profile_id containts the different websiteprofileId's found on the Mollie dashboard.
$provider = new MollieConnectProvider($request, $clientId, $clientSecret, $redirectUrl);
$newAccessToken = $provider->getRefreshTokenResponse($shop_mollie_data->refresh_token);
$mollie = new MollieApiClient();
$mollie->setAccessToken($newAccessToken['access_token']);
$payment = $mollie->payments->create([
'amount' => [
'currency' => 'EUR',
'value' => (string) (sprintf("%.2f", $order_total))
],
'description' => ucfirst($shop->name) . ' - Order #' . $order_nm,
'webhookUrl' => $url_callback,
'redirectUrl' => $url_success,
'method' => 'bancontact',
'locale' => $language_id,
'metadata' => [
"order_id" => $ref,
"shop id" => $shop->id
],
'profileId' => $shop_mollie_data->profile_id,
'testmode' => true,
'applicationFee' => $applicationFee
]);
I'm trying to make it so when someone clicks on the unsubscribe link in an email sent via the Mandrill API (using PHP) it works as described in: http://help.mandrill.com/entries/23815367-Can-I-add-an-automatic-unsubscribe-link-to-Mandrill-emails-
The *|UNSUB|* merge tag is not getting parsed. It just comes through in the the body of the email received.
Near the end of the message content ($message_content) I have:
Click here to unsubscribe.
In Gmail, the link is: Click here to unsubscribe.
(NOT a valid HREF, so Gmail just ignores the anchor tag)
In Outlook 2010 the link is: Click here to unsubscribe.
(Not a valid HREF)
Is there some merge_vars parameter I should add to the headers?
http://help.mandrill.com/entries/21678522-How-do-I-use-merge-tags-to-add-dynamic-content- mentions them, but I can't find what the parameter should be for the UNSUB merge tag.
$mandrill = new Mandrill($mandrill_api_key);
$message = array(
'html' => $message_content,
'subject' => $subject,
'from_email' => 'me#mydomain.com',
'from_name' => 'MY NAME',
'to' => $to_list,
'headers' => array('Reply-To' => 'me#mydomain.com'),
'important' => false,
'track_opens' => 1,
'track_clicks' => null,
'auto_text' => null,
'auto_html' => null,
'inline_css' => null,
'url_strip_qs' => null,
'preserve_recipients' => 0,
'view_content_link' => 1,
'tracking_domain' => null,
'signing_domain' => null,
'return_path_domain' => null,
'merge' => true,
'global_merge_vars' => array(
array(
'unsub' => 'unsub'
)
),
);
What step am I missing?
TIA!
The problem was the URL was missing a slash (http:/mydomain...)
This was caused by TinyMCE converting URLs. I added convert_urls: false to the tinymce.init and that solved my problem.
Kudos to Mandrill Support for helping me identify the problem.
I am using Amazon SES server for sending notifications emails to my users. I have verified email and verified domain. So SES_Client is sending emails successfully.
Here is my code:
public function send($subject, $recipients, $body, $senderName){
$response = $this->SESClient->send_email(
$senderName.'-noreply#example.com',
array(
'ToAddresses' => $recipients
),
array(
'Subject' => array(
'Data' => $subject,
'Charset' => 'UTF-8'
),
'Body' => array(
'Text' => array(
'Data' => $body,
'Charset' => 'UTF-8'
),
'Html' => array(
'Data' => $body,
'Charset' => 'UTF-8'
)
)
)
);
return $response->isOK();
}
Problem:
How can I pass parameters values in email text that are belongs to individual recipient in recipients array?
Is there a way at amazon server where I can create queue of my recipients and when SES server will send my email. It will replace all parameters values that belongs to each recipient.
The ToAddresses field should be an array.
Is there a way at amazon server where I can create queue of my recipients and when SES server will send my email. It will replace all parameters values that belongs to each recipient.
No, AWS and the SES service does not currently support this.
Is there a way to get the Amazon buyback (aka "trade-in") prices for textbooks through an API? I've searched around for a while but can't find a clue how people are getting this for their websites..
Here is the Amazon BuyBack program: amazon.com/buyback
Here is an example buyback URL: http://www.amazon.com/gp/search/s/ref=tradeinavs?url=rh%3Dn%3A2205237011%26i%3Dtextbooks-tradein&field-keywords=978-0321614018&Go.x=10&Go.y=17
I'm aware that I could just fetch the pages and parse the HTML, but if there is some way to get it through an API or whatever, I'm sure Amazon would prefer that to just parsing the page (also it would be faster to query).
The Product Advertising API has it in the ItemAttributes section when you do an ItemLookup search, as shown by this sample call (I believe this is perl, but just to show you a sample):
my $request = {
Service => 'AWSECommerceService',
Operation => 'ItemLookup',
Version=>'2010-11-01',
ItemId => $itemId,
ResponseGroup => 'ItemAttributes',
};
snip
'ASIN' => '0136100570',
'ItemAttributes' => {
'NumberOfItems' => '1',
'IsEligibleForTradeIn' => '1',
'TradeInValue' => {
'Amount' => '3550',
'CurrencyCode' => 'USD',
'FormattedPrice' => '$35.50'
},
'ListPrice' => {
'Amount' => '18900',
'CurrencyCode' => 'USD',
'FormattedPrice' => '$189.00'
Source: https://forums.aws.amazon.com/message.jspa?messageID=212679