• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

The "client_reference_id" argument is not passed

phpstripe-payments


PHP Snippet 1:

class CheckoutController < ApplicationController

PHP Snippet 2:

cart = Cart.find(params[:id])
session = Stripe::Checkout::Session.create({
    payment_method_types: ['card'],
    line_items: [{
        description: "Your product description",
        name: "Name",
        amount: 1999,
        currency: 'eur',
        quantity: 1,
    }],
    
    client_reference_id: cart.id,
    mode: 'payment',
    success_url: root_url,
    cancel_url: root_url,
})

redirect_to session.url, allow_other_host: true

Related Snippets

curl returning 301 error after migrating to https

Unit (real unit test) of test laravel relationship

Laravel - Browser displays message again when I press back button

How to properly start Laravel 8 with Bootstrap & authentication

Eloquent insert id with sequence next value

How to get Laravel's CSRF Token from Another Website?

Session timeout in Yii2

protect images from being copied

Using if(isset($_POST['submit'])) to not display echo when script is open is not working

(Laravel) How to delete multiple models including optional relationships?

virtctl works when executed via command line but not from php exec()

Group data in a multidimensional array based on two columns

Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: ) in Unknown on line 0

Get Header Authorization value of a login api (sent with username and password in json body) using php curl

Saving Data from form to database using AngularJS and php

About Contact Privacy policy Terms and conditions