Skip to content

Unprocessable Entity on adding Application Charges #6

@kurtommy

Description

@kurtommy

Hi to all,

I recive an error on running this code present in the example:

Unprocessable Entity - 422

$charge = array
(
"recurring_application_charge"=>array
(
"price"=>10.0,
"name"=>"Super Duper Plan",
"return_url"=>"http://super-duper.shopifyapps.com",
"test"=>true
)
);

    try
    {
        // All requests accept an optional fourth parameter, that is populated with the response headers.
        $recurring_application_charge = $shopify('POST', '/admin/recurring_application_charges.json', $charge, $response_headers);

        // API call limit helpers
        echo shopify_calls_made($response_headers); // 2
        echo shopify_calls_left($response_headers); // 298
        echo shopify_call_limit($response_headers); // 300

    }
    catch (ShopifyApiException $e)
    {
        // If you're here, either HTTP status code was >= 400 or response contained the key 'errors'
    }

Some suggestion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions