Order number series: "Default Payment Reference" does not exist.
Now, the exception is true, it doesn't exist, but equaly, nothin references it, so I don't even know why it's looking for it? The catalog is told use a custom numbering series, so I don't know why it isn't just getting that.
Ok, a little digging, and it seems the ExternalPaymentMethodService which my payment provider inherits from is hard coded to use "Default Payment Reference" to grab an order number if one isn't set in the method GetReferenceId.
Looks like it's virtual though, so I was able to override it with the following:
we use the payment reference counter to make sure that we send unique values to the payment gateways if the same order needs to pass through the payment gateway twice.
If a customer were to initiate payment with the gateway, then cancel payment, return to the web site, and later try payment again the payment gateway would fail because the same order number would be passed in twice. That's why we're using the payment reference and also assign an order number after payment is accepted with the gateway.
You've got a valid point about the default payment reference counter though. The default providers shouldn't fail just because it's deleted.
Would my fix be suitable then? It should be getting the number serie from the current site, so it should still abide by the rules you laid out, it's just grabing the number serie from the cart setup.
If you're recreating the payment on each request you'll be fine.
You may want to consider whether the store manager is happy with order numbers skipping a beat from time to time. There are no accounting requirements for them to be sequential so you can pretty much do whatever you want.
If you're doing invoicing with uCommerce remember to keep the invoice numbers sequential.
I'm not sure how you mean order numbers would skip a beat? This is the same code as standard, the only thing I've done is made it choose the numbering serie based upon the current cart, as this provider will be used in a multi site config, and I want different number serie per site.
If the order number is assigned prior to redirecting to the gateway you'd have to reassign a new order number if the customer cancels the first payment attempt on the gateway, returns to the store, and then takes another pass with the payment gateway. It won't happen often, but it will happen.
This all assumes that the gateway requires unique order numbers. If that's not the case you won't have to reassign order number and you don't have to worry about broken order number series.
Order number series: "Default Payment Reference" does not exist.
Hey Guys,
I'm trying to test a custom payment provider, however when I try to call:
TransactionLibrary.CreatePayment(newPaymentMethodId, requestPayment: false);
I get a YSOD
Order number series: "Default Payment Reference" does not exist.
Now, the exception is true, it doesn't exist, but equaly, nothin references it, so I don't even know why it's looking for it? The catalog is told use a custom numbering series, so I don't know why it isn't just getting that.
Any thoughts?
Matt
PS If I process payments using the default payment process, the order goes through ok
Ok, a little digging, and it seems the ExternalPaymentMethodService which my payment provider inherits from is hard coded to use "Default Payment Reference" to grab an order number if one isn't set in the method GetReferenceId.
Looks like it's virtual though, so I was able to override it with the following:
Might be worth one of the uCommerce guys updating it in the base class though?
Matt
Hi Matt,
we use the payment reference counter to make sure that we send unique values to the payment gateways if the same order needs to pass through the payment gateway twice.
If a customer were to initiate payment with the gateway, then cancel payment, return to the web site, and later try payment again the payment gateway would fail because the same order number would be passed in twice. That's why we're using the payment reference and also assign an order number after payment is accepted with the gateway.
You've got a valid point about the default payment reference counter though. The default providers shouldn't fail just because it's deleted.
Hi Soren,
Would my fix be suitable then? It should be getting the number serie from the current site, so it should still abide by the rules you laid out, it's just grabing the number serie from the cart setup.
Matt
If you're recreating the payment on each request you'll be fine.
You may want to consider whether the store manager is happy with order numbers skipping a beat from time to time. There are no accounting requirements for them to be sequential so you can pretty much do whatever you want.
If you're doing invoicing with uCommerce remember to keep the invoice numbers sequential.
Hope this helps.
I'm not sure how you mean order numbers would skip a beat? This is the same code as standard, the only thing I've done is made it choose the numbering serie based upon the current cart, as this provider will be used in a multi site config, and I want different number serie per site.
If the order number is assigned prior to redirecting to the gateway you'd have to reassign a new order number if the customer cancels the first payment attempt on the gateway, returns to the store, and then takes another pass with the payment gateway. It won't happen often, but it will happen.
This all assumes that the gateway requires unique order numbers. If that's not the case you won't have to reassign order number and you don't have to worry about broken order number series.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.