#sxe
1 messages · Page 1 of 1 (latest)
If stripe cancels a bad payment, but I cancel it again, how can I not cancel the first payment because it was already cancelled?
Can you be more specific? I'm afraid I don't understand exactly what you're talking about
I tested this:
I placed in my basket one item = 10 RON.
I entered on the payment page, where $price = 1000
I opened a new page, and I added in my basket another object too. So, the price was now 20 RON.
And, I came back to my first opened tab, where $price was still 10 RON
And proceeded the payment.
But, stripe cancelled it.
Because, $price was 2000, and payment was only 1000
And, in my webhook, I cancel it again because $basketvalue != $price
Still vague, no?
What do you mean by "stripe cancelled it" - do you have specific object IDs that I can look at?
Not right now, but I can try it again in 30 minutes and create a new thread.
If it'll just be 30 minutes then we can just leave this thread open
Can you tell me,
what does this exactly do?
if ($event->type == 'payment_intent.amount_capturable_updated')
{
$stripe->paymentIntents->capture(
$intent_id,
[]
);
}
I assume this is in your webhook event handler - so when you receive a payment_intent.amount_capturable_updated event it'll capture the Payment Intent
I kinda rewrote the entire code, made it cleaner. So, I have a question.
I'm trying to implement some security protocols.
Scenario:
User adds to his basket, one item valued 10$.
In global.php, with mysql queries,
$basketvalue = 10.
User now proceeds to payment page, where,
$paymentIntent = \Stripe\PaymentIntent::create([
'amount' => $basketvalue*100,
He doesn't insert his bank card yet, he opens a new tab.
He adds a new item in his basket, where. $basketvalue = 20 now.
He goes back to first tab, where $basketvalue = 10
And proceeds the payment.
Me, in webhook.php, I'm trying to detect,
if, $basketvalue * 100 equals to amount_captured, then approve the payment.
if it doesn't, cancel it.
Am I doing something ok?
Is there a reason you're doing this though? Why can't you refresh the UI in the first tab so that the basket is displayed correctly?
Well, how can I refresh the UI?
Because the addment was done by a new tab in the browser.
How can the server detect that there is a new item in the basket,
Or there was a modify made.
Or, I could load the global.php with ajax query each 1 second?
If you're using Payment Element you can use fetchUpdates to update the UI (see https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#fetch-updates) - as for how to know that a new item is in your basket, you could poll at regular intervals, you could update the UI before confirmation, it's up to you
<?php
$intent = $stripe->paymentIntents->update(
'{{PAYMENT_INTENT_ID}}',
['amount' => 1499]
);
echo json_encode(array('status' => $intent->status));
?>
Yes, but how can I update it
if the php page is still static
Or, you mean that, I can update it in my webhook.php ?
No, let's back up - are you using Payment Element at all?
Payment Element is something you'd use in combination with Payment Intents - Payment Element is what you'd use in your UI to collect the payment details
Stepping in for Karbi here.
Yes, but how can I update it if the php page is still static
That would be up to you and the way your site/application works. What exactly are you trying to update?
I was trying to either,
A) In webhook.php compare the $basketvalue equals to captured_amount if they are equal,
if they are equal => capture it,
if they are not equal => cancel it,
either,
B) Constantly update the global.php (what includes the $basketvalue) in the payment page, so if the user adds a new item, or removes it, or price gets modified before the placement of the payment, the page gets modified live.
I'm thinking to go on B, so I was now trying to constantly setinterval with jquery.
Whatever works for you application is probably fine! This is outside of the scope of your Stripe-specific integration.
Is create.php loaded in checkout.js ?
What do you mean, exactly? Can you share any relevant code snippet?
index.php
<script src="checkout.js" defer></script>
checkout.js
async function initialize() {
const { clientSecret } = await fetch("create.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ items }),
}).then((r) => r.json());
elements = stripe.elements({ clientSecret });
const paymentElement = elements.create("payment");
paymentElement.mount("#payment-element");
}
create.php
<?php
require 'vendor/autoload.php';
// This is your test secret API key.
\Stripe\Stripe::setApiKey('x');
$Price = $Price*100;
header('Content-Type: application/json');
try {
// retrieve JSON from POST body
$jsonStr = file_get_contents('php://input');
$jsonObj = json_decode($jsonStr);
$stripe = new \Stripe\StripeClient(
'x'
);
// Create a PaymentIntent with amount and currency
$paymentIntent = \Stripe\PaymentIntent::create([
'amount' => $Price,
'currency' => 'ron',
'payment_method_types' => ['card'],
'capture_method' => 'manual',
'metadata' => [
'UserID' => $_SESSION['ID'],
'IP' => $_SERVER['REMOTE_ADDR'],
]
]);
$output = [
'clientSecret' => $paymentIntent->client_secret,
'id' => $paymentIntent->id,
];
echo json_encode($output);
} catch (Error $e) {
http_response_code(500);
echo json_encode(['error' => $e->getMessage()]);
}
?>```
OK thanks, but I'm afraid I don't understand your question
I've managed to do this:
Currently, when the price is updated, the index.php updates the price also.
But, when I'm sending the payment process,
Stripe registers the old price,
instead the new price.
Is create.php loaded in checkout.js
Your checkout.js code makes a request to your create.php endpoint
It sounds like you have some state you need to update in your app, but that's going to be something that depends entirely on your implemenetation
Is there any way, where I can update the create.php ?
Currently, what am I doing is this:
index.php
<form id="payment-form">
<div id="payment-element">
<!--Stripe.js injects the Payment Element-->
</div>
<button id="submit">
<div class="spinner hidden" id="spinner"></div>
<span id="button-text"></span>
</button>
<div id="payment-message" class="hidden"></div>
</form>
<script>
$(function(){
function pingServer(){
$('#button-text').load('test.php');
}
setInterval( pingServer, 1000 );
});
</script>
test.php
<?php
include_once(''.$_SERVER['DOCUMENT_ROOT'].'/global.php');
?>
Plătește (<?php echo number_format($Price,",",".")?> RON) ```
Which, is totally fine,
It updates the price on the index.php
But, create.php is not being updated, and I don't know how should I update it because it's being fetched on.. where?
I don't see any include for create.php on index.php
That's code entirely in your control, you can change it however you like
Yes, but I don't understand how does create.php is included in my index.php
It's being called to get a payment intent as an async fetch call, right?
Because of this
const { clientSecret } = await fetch("create.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ items }),
}).then((r) => r.json());
right?
So, I should add checkout.js on setinterval, so I could load it again, and again?
so create.php should reload it with new price?
If that does what you need, you could, but it might not be ideal
From your POV, what could be ideal?
What if, I'd use paymentIntents->update(
inside test.php ?
updating each second the intent.
It shouldnt be necessary to update repeatedly unless something has changed, you'd want to track state & changes somewhere
Is there any way, to get the payment intent ID, in the index.php, even if I didn't send the payment yet?
What do you mean?
The payment intent only exists after its created, you could create it in your index page build if you prefer to, then only using another endpoint to update
How do you normally manage your async state tracking? You can handle all your Stripe integration points similarly
I mean this:
I entered on the payment page, without clicking "Pay" nor completing the card's infos.
And stripe created the intent.
"object": {
"id": "pi_3KxzqRLKPu9R0yzS0Ly2REpY",
inside my create.php, i have these lines.
$output = [
'clientSecret' => $paymentIntent->client_secret,
'id' => $paymentIntent->id,
];
Would, inserting a new line inside create.php, as this
$output = [
'clientSecret' => $paymentIntent->client_secret,
'id' => $paymentIntent->id,
];
$paymentid = $output['id'];
and inside the index.php
<?php echo $paymentid ?> ``` work?
Or this is a bad approach
That doesn't look like the way create.php works though, it responds with json data and already includes that id
Then, how can I get the current payment intent's id, on my index.php?
So in your client js code you can get the id in the same spot you get the clientSecret if you want to track that
Without having to press submit?
If you wanted to create the payment earlier, you'd need to make an async request to do that
My create.php is creating the payment intent right when I access the payment page.
I'll be honest: it sounds like you're struggling with the overall architecture and async flow of the application here
I'm struggling because I rarely worked with a lot of js.
Was this build by another developer and you're trying to modify it?
I was using the create charge, before, two years ago maybe and had lesser js.
It's the official stripe's source code.
What do you mean official source code? One of our examples?
OK, so that's an illustration of how you can do this
Are you writing something new or adapting that pre-existing code?
I'm trying to adapt something new, to the pre-existing code.
So we do have a number of guides to help migrate Charges APi code to use payment intents, eg: https://stripe.com/docs/payments/payment-intents/migration
Which may make more sense for what you already have, but maybe not
Sure, that guide helps you move from charges to payment intents
No.
I do have the payment intent right now.
I'll tell you what I want to do, what I did until this moment,
And maybe you can help me what should I do from this moment to the next one.
-
I've downloaded the Payment intent, create a payment page source code.
(https://stripe.com/docs/connect/creating-a-payments-page?ui=elements). -
I've implemented the webhook into the code.
-
I've added capture method manual, and, some metadatas to my create intend.
Payments, do work fine and everything is okay, but,
I've asked myself a question. What would happen, if the prices would change while user is on the payment page and did not submit the payment?
So, I've tried to make the page a live one, where the price would update.
How do I get the price? : I'm getting the prices from a global.php file, with some mysql queries.
How does my create.php page looks like?
<?php
include_once(''.$_SERVER['DOCUMENT_ROOT'].'/global.php');
require 'vendor/autoload.php';
// This is your test secret API key.
\Stripe\Stripe::setApiKey('x');
$Price = $Price*100;
header('Content-Type: application/json');
try {
// retrieve JSON from POST body
$jsonStr = file_get_contents('php://input');
$jsonObj = json_decode($jsonStr);
$stripe = new \Stripe\StripeClient(
'x'
);
// Create a PaymentIntent with amount and currency
$paymentIntent = \Stripe\PaymentIntent::create([
'amount' => $Price,
'currency' => 'ron',
'payment_method_types' => ['card'],
'capture_method' => 'manual',
'metadata' => [
'UserID' => $_SESSION['ID'],
'IP' => $_SERVER['REMOTE_ADDR'],
and a long list of metaatas...
]
]);
$output = [
'clientSecret' => $paymentIntent->client_secret,
'id' => $paymentIntent->id,
];
echo json_encode($output);
} catch (Error $e) {
http_response_code(500);
echo json_encode(['error' => $e->getMessage()]);
}
?>
as you can see, 'amount' equals to $Price.
When, the user, enters on the payment page, stripe creates this intent.
With amount equal to $Price.
Now, I just changed the price of a product, and my basket is now valued 22.61 RON
The price changed itself, due this:
<script>
$(function(){
function pingServer(){
$('#button-text').load('test.php');
}
setInterval( pingServer, 1000 );
});
</script>
test.php
<?php
include_once(''.$_SERVER['DOCUMENT_ROOT'].'/global.php');
?>
Plătește (<?php echo number_format($Price,",",".")?> RON)```
But, there's the catch, even if the button has changed it's value,
create.php still has the old value (33.92)
and if I would complete my bank card, and place the payment, it would give me an error.
as it gave me here
"id": "evt_3KxzqRLKPu9R0yzS0w8h82AU",
"id": "pi_3KxzqRLKPu9R0yzS0Ly2REpY",
So, basically, what I'm trying to do is, to refresh / update the paymentintent (from create.php) with the new price, and new metadatas, as I am doing with the button.
OK, so lets take a step back
We got it, you can delurk
@harsh python taking over for synthrider who is done for the day
if you're changing the underlying PaymentIntent you need to re-render the Payment Element, is that what you're trying to do?
I think so, yes.
I'm trying to modify the values of paymentintent::create
Have you considered just rendering the UI only after the amount is stable instead?
But, what if the price changes after the UI has been rendered?
Can't I update, the paymentintent in my webhook.php ?
When, the user will press the 'pay' button, I'd update the payment intent with new amount, new metadatas.
Would this be easier?
Just trying to get you on the right track you seem to be mixing up so many concepts
like a "webhook.php" would be code that handles webhook events. This is not the code that would change the PaymentIntent amount those should be entirely separate
Oh, I thought that, I can use the paymentIntents->update( in the webhook.php.
Thank you for the clarification.
no it doesn't really make sense
your webhook.php code is what will receive say payment_intent.created
It's another part of your application that should be changing the PaymentIntent amount, for example if they add something else to their cart/order
that part of your integration should
1/ Call the Update PaymentIntent API https://stripe.com/docs/api/payment_intents/update
2/ Likely log/track in your database what is being ordered/paid for
The entire payment flow happens when your code client-side confirms the PaymentIntent itself, so there shouldn't be a world where the 2 are out of sync
Does that all make sense?
Maybe there's a communication barrier between me and you because I don't speak English very well,
But,
I currently save all products in my database. Once saved, I calculate the price after taxes and discounts, if there is a promotion.
Once the user clicks on the "Redirect me to payment page" button, from what I noticed on my stripe account, an intent is created
Please note that the user has not yet entered their bank details or pressed payment, but the intent has been created.
I was thinking about a few security flaws as well.
- If a discount promotion expires while the user is on the payment page and failed to pay and the price changes until he makes the payment?
- If, the price of an object changes while the user enters their bank details?
And more possible security flaws as out of stock items and so on.
So, I decided to make the payment page real-time. Using index.php, a javascript code, setinterval, I entered the payment text of the live one button, which changes every 1 second with the price calculated from the database, with mysql queries.
As you can see, the text in the blue button is a live text that is updated every second. Now, it doesn't change because there are no price updates, new items in the cart, expired discounts and so on.
However, if there is a price change, let's say that from 22.61 it would turn into 30.00, and I would enter my bank details, Stripe would cancel my payment because the intent was created at 22.61 ( because, with this price I entered the payment page, and the price changed while I was on the page and the intent already created.)
Although I managed to update the price from the payment button, I don't know how to update the price and metadata from the create.php page.
yeah I understand some bits of this but not most
why would you have a setInterval. Why would the price change server-side? What could cause this if not some actions client-side already?
Ultimately, your approach works, if you had something that every X seconds goes to your server and checks if the PaymentIntent has changed, it would work. Client-side you'll need to unmount the PaymentElement entirely and remount it
So what specific part is blocking you with your code right now?
- Why would the price change server side?
The price would change on the server-side because, let's say that on TAB1 you entered the payment page with 5 objects, worth 50 RON. But, you open a TAB2, and insert another object in your basket, already your basket is worth 6 objects worth 60 RON. You go back to TAB1, where the intent has already been created with 50 RON, and you pay 50 RON for 6 objects. That's why I did SetInterval, because every second it updates, what price it should be, from the database.
I see, so you basically want some kind of complex JS that will detect other tabs (or devices) that would change the cart?
I don't think even Amazon bothers with this :p
xD
Basically, I just want to update the amount.
Because as I said, if you came in with 50 RON to pay, however, a discount promotion has expired, and you have to pay 60 RON, what happens? That, while typing in your card details.
- So what specific part is blocking you with your code right now?
Currently, I don't know how to refresh the create.php page.
yeah that's not the right way to look at it unfortunately
You don't really "refresh create.php" that's not how PHP works
Yes, the user entered the payment page, the intent was created with 50 RON. However, in the $Price database from 50 RON it turned into $Price = 60.
How do I update this, so that when he presses the pay button, he pays 60 RON, instead of the 50 that was created when he entered the page?
Your server-side code (PHP) should know about you and which PaymentIntent you are trying to pay. So what you can do is some JS code that hits the server say every 10 seconds and it says "I have pi_123 and I'm seeing amount is 123456, can you let me know if it changed?" and then your server-side code can retrieve the PaymentIntent (or better it caches it locally) and it re-calculates the amount that is owed and it tells the client if it changed
My server currently calculates how much money to pay, as evidenced by the ongoing payment button.
My question is, can I use *paymentIntents->update( * on my index.php page?
Using the intent created by \ Stripe \ PaymentIntent :: create ([?
yes
that you can, and when you change the amount you need to also update the UI client-side to re-render the element
Because, look, if I have this code, and stripe creates it for me even if I haven't pressed the payment button yet, am I thinking of using $output ['id'] in the code where I use SetInterval, and keep updating the price?
$stripe = new \Stripe\StripeClient(
'x'
);
// Create a PaymentIntent with amount and currency
$paymentIntent = \Stripe\PaymentIntent::create([
'amount' => $Price,
'currency' => 'ron',
'payment_method_types' => ['card'],
'capture_method' => 'manual',
'metadata' => [
'UserID' => $_SESSION['ID'],
'IP' => $_SERVER['REMOTE_ADDR']
]
]);
$output = [
'clientSecret' => $paymentIntent->client_secret,
'id' => $paymentIntent->id,
];
$paymentid = $output['id'];
echo json_encode($output);
$paymentid = $output['id'];
There's no "price" that $price is your own PHP code
Yes, I agree that.
I hope it's okay to say this but you are missing some fundamentals on web developer I think
you want to have a database, that stores your PaymentIntent id pi_123 and all the relevant information
You can say anything, of course you have a much better experience than mine.
you're not supposed to just output the id client-side, if you did, anyone could abuse your code to look at other PaymentIntents and that's not what you want
every request from your client goes to your PHP code and that PHP code should know exactly which PaymentIntent to look at. Usually you do this with a cookie / PHP session for example
So you're saying I'd better save the intent id as a session?
yes absolutely
Also a colleague just shared that you could use https://stripe.com/docs/js/elements_object/fetch_updates client-side
Great idea!
it forces the refresh of the PaymentElement based on what changed on the PaymentIntent
seems like exactly what you needed
Does an intent ID need to change continuously with each refresh?
Each page refresh *
I think I broke something?
Is it okay to generate a different intent with each page refresh?
no, you should re-use the existing one
your code is just creating a new one each time
But why is this happening to me? I didn't add anything to the code other than that
$_SESSION['payintent'] = $output['id'];
inside the create.php
I mean I don't know, that's your PHP code, I assume it's always happened this way?
Before I added this code, I would've get only one intent, even if I'd refresh 5000 times.
Could I do something else? To run a if(isset($_SESSION['payintent'],
and if is not set, allow the PaymentIntent::create
if is set, do nothing ?
yes that would work
I think I'm the only user who wants planes, right? lol.
:p
Please note that once I added the condition, the stripe UI was no longer loaded, and no php error was generated.
And also, $_SESSION['payintent'] shows an previous intent.
I'll remove that line so I can debug it.
sure, for now this seems purely in your code
To make sure I understand, I need to get the ID from the intent and update?
And I write the update code in the test.php document which is with setinterval and is continuously updated?
we don't care about the id overall, just the client_secret, the id is irrelevant to the Payment Element
Is there any way to not alllow stripe from trying to resubmit the event to the webhook? (From what I'm reading here, he'll try to resend in an hour)
it'll try*
events are retried automatically but you don't need events for any of this flow for now so ignore it
I refreshed the page and checked the webhooks on Stripe. Indeed, another payment_intent.created has been generated
Should I worry that a payment_intent.created event is generated at each page refresh?
yes you should
this means you don't really understand your code unfortunately
you're supposed to put the existing PaymentIntent id in a session
and then on page load you need to look at that session and whether there's already a PaymentIntent instead of recreating a new one each time
Now I'm trying to change the code, thanks.
sure!
I just set that, if is set $_SESSION['paymentintent'] => then retrieve payment intent,
if !isset $_SESSION['paymentintent'] => then create intent & set session with that id.
That's right until now?
yes
Also, can I remove all webhook events without having to delete the webhook itself and recreating?
Okay, I refreshed again and looked over the Stripe panel. No more new intents are generated.
Thank you.
yay!
This PaymentIntent's amount could not be updated because it has a status of succeeded. You may only update the amount of a PaymentIntent with one of the following statuses: requires_payment_method, requires_confirmation, requires_action.
Hi 👋 I'm stepping in for @balmy wigeon
hi
I've been reading this thread and I think the reason for updating the Payment Intent is in response to a user adding another item to their cart, yes?
Yes, to modify the price itself.
While the user is on the payment page.
Okay so in that case you would not be making an update request on a Payment Intent that had already succeeded, correct?
I'm trying to make the update request for a created intent.
Which has 200 response code.
Okay let me zoom out and provide a summary of the intended flow as I read it and you can correct me if I'm wrong
- User selects a price/product and proceeds to the checkout form. <- Payment Intent created
- User makes some change that affects their total price for this checkout <- Payment Intent Updated on Server
- Payment Element calls
fetch_updates()to update to amount shown to the user - User provides payment method details and submits form <- Payment Intent confirmed
I'm still at 2.
the no.3 I made it with an SetInterval jquery, which I'm constantly pinging the test.php to show me the current value of the basket.
<button id="submit">
<div class="spinner hidden" id="spinner"></div>
<span id="button-text"></span>
</button>
<script>
$(function(){
function pingServer(){
$('#button-text').load('test.php');
}
setInterval( pingServer, 1000 );
});
</script>
I don't think you should need to use SetInterval. When the user makes a change in the front-end, I would send a request back to my server with the new total amount
Then the response back to the front-end would trigger Step 3
testphp
<?php
include_once(''.$_SERVER['DOCUMENT_ROOT'].'/global.php');
require 'vendor/autoload.php';
if(isset($_SESSION['payintent'])) {
$Price = $Price*100;
if($_SESSION['pretdeplata'] != $Price
OR
$_SESSION['CateProduse'] != $ID) {
$stripe = new \Stripe\StripeClient(
'x'
);
$stripe->paymentIntents->update(
$_SESSION['payintent'],
['amount' => $Price]
);
$_SESSION['pretdeplata'] = $Price;
$_SESSION['CateProduse'] = $IDrow1010;
}
}
?>
Plătește (<?php echo number_format($Price,2,",",".")?> RON)```
This is the test.php
@regal path the changes can happen in another tab
they just want to ensure they have the right version always (still I would never build it this way either)
Copy that @balmy wigeon then setInterval makes sense
I'm doing something that neither the Amazon would do, lol, as you said.
I'm trying to do *
But I would still expect a customer action that changes the price on the client-side to generate a request back to the server to update the price.
So,
I am on tab 1
tab 2
Prices match.
I increased the amount with +1 item
which, now price is 33.92
On tab 2, the price matches too, because of the set interval
But, there's a but,
pi_3Ky25gLKPu9R0yzS1arPxPFB
"amount": 2261,
is the old price.
So, I've added in to the test.php (the document which is being constantly updated in the setinterval code)
the following code :
$stripe = new \Stripe\StripeClient(
'x'
);
$stripe->paymentIntents->update(
$_SESSION['payintent'],
['amount' => $Price]
);
Current amount is amount: 3392,
Where are you seeing the old amount?
That is the created event
That was the state of the PI when it was created
You have to look at the current state of the PI. Here's a link to your Update API call: https://dashboard.stripe.com/test/logs/req_uRE2Sx03eSgQxK
So my update works?
Where you updated the amount to 3392
It looks like it to me. You can see in the response the Payment Intent amount matches what you are displaying on your site
And, in the webhook api, should I check in the event payment_intent.succeeded, or in the payment_intent.amount_capturable_updated
If the payment was sucesfull?
succesfull *
payment_intent.succeeded tells you the payment was successful.
Occurs when a PaymentIntent has successfully completed payment.
Thank you. I'll fix a bit in the code, make it cleaner and I'll try to debug the current errors.
Ok great, I'm glad we could get you further along in your integration
@balmy wigeon thank you for your time and your clarifications
@regal path thanks that you pointed me some good infos.
happy to help 🙂
^ +1
Is this a good approach?
$stripe->paymentIntents->update(
$_SESSION['payintent'],
['amount' => $Price],
['metadata' => ['UserID' => $_SESSION['ID']]],
['metadata' => ['IP' => $_SERVER['REMOTE_ADDR']]]
);
The metadata area
I think you need to specify the metadata parameter only once and include both key=>value pairs.
As this?
$stripe->paymentIntents->update(
$_SESSION['payintent'],
['amount' => $Price],
['metadata' => [
'UserID' => $_SESSION['ID'],
'IP' => $_SERVER['REMOTE_ADDR']
]
]
);
Yes I think that approach will work better for you.
Thank you.
😹
"will work better for you" is a polite way to say "because the other way really wouldn't work" :p
Hey, I'm just happy @harsh python properly uses code formatting in here
You know how many times we have to ask
'Because you're wasting your time trying the other way'
xD
Thank you.
It really helps
Guess what, trying to implement new things helps me to improve my coding skills too.
Writing more code and solving new problems tends to improve overall coding skills
Specially that you guys give me good advices.
Got unexpected keys in options array: metadata in
Did I do something wrong?
['metadata' => [
'UserID' => $_SESSION['ID'],
'IP' => $_SERVER['REMOTE_ADDR'],
'DiscountAplicat' => $outputrow1007e,
'Transport' => $Transportrow1007,
'NumeTransport' => $NumeTransportrow1007,
'PrenumeTransport' => $PrenumeTransportrow1007,
'Localitatea' => $Localitatearow1007,
'Adresa' => $Adresarow1007,
'Email' => $Emailrow1007,
'Telefon' => $Telefonrow1007,
'AdresaTransport' => $AdresaTransportrow1007,
'SumaTransport' => $PretTransport,
'CateProduse' => $IDrow1010
]
]
Oh, right, you will need to include the metadata key in the same array as your amount key
Yes, please give that a try
Fixed it, thank you.
🎉